A coworker of mine once referred to := as the 'Zoidberg operator', and the name has stuck with me since.
Why Does “=” Mean Assignment?
61–70 of 367 posts
Re: Why Does “=” Mean Assignment?
#62The '=' sign is used because after that statement the variable will indeed have equality with the r-value. Coincidentally in async languages like Verilog there is a another assignment operator '<=' which means that the variable won't take the new value until the next clock cycle (or more explicitly the next evaluation of the process block). '=' exists also and has the same meaning as with traditional languages.
a
Should set a to the minimum of a and 1. I.e. after that statement the variable will indeed be less than or equal to the RHS.Re: Why Does “=” Mean Assignment?
#63Earlier quoted context omitted.
Ditto. Fun fact: various dialects of BASIC let you optionally put LET before your assignment statements. So the following are equivalent: X = 10 LET X = 10
Wait...LET was optional? Auigh! Whole months of my childhood, wasted!
Re: Why Does “=” Mean Assignment?
#64Can anyone explain to me what this is supposed to mean? (I know Prolog, I understand cuts very well. But I don't know what the author means here.)
Re: Why Does “=” Mean Assignment?
#65The '=' sign is used because after that statement the variable will indeed have equality with the r-value. Coincidentally in async languages like Verilog there is a another assignment operator '<=' which means that the variable won't take the new value until the next clock cycle (or more explicitly the next evaluation of the process block). '=' exists also and has the same meaning as with traditional languages.
By that logic, a Should set a to the minimum of a and 1. I.e. after that statement the variable will indeed be less than or equal to the RHS.
Re: Why Does “=” Mean Assignment?
#66because in math it means assignment. y = mx+b That is an assignment. There is also a math symbol that specifically designates equivalence.
Re: Why Does “=” Mean Assignment?
#67A coworker of mine once referred to := as the 'Zoidberg operator', and the name has stuck with me since.
Re: Why Does “=” Mean Assignment?
#68Bcpl still exists in 2018?
Here's a PDF about running BCPL on a Raspberry Pi: http://www.cl.cam.ac.uk/~mr10/bcpl4raspi.pdf It's aimed at teaching programming to 10 year olds no prior experience. One of the first examples is implementing RSA.
Re: Why Does “=” Mean Assignment?
#69Earlier quoted context omitted.
I don't think I've heard of this before; I'd love to watch it if you have a link!
I'd also want to see the link, if available!
Re: Why Does “=” Mean Assignment?
#70The length of symbols should roughly be negatively correlated with its frequency. Since in procedural language, assignment is a much more common operation than equality check, it is reasonable to favor "=" over ":=" or even "<-".