4 ms·
I really like this about pascal. We read it out loud as "becomes the same as", this being what was actually happening. I've carried the habit over to C despite
by noonespecial 9y ago
I really like this about pascal.
We read it out loud as "becomes the same as", this being what was actually happening. I've carried the habit over to C despite the bare =, it helps me reason and seems to aid in preventing the =/== error.
- mturmon 9y agoThe shorthand I use for "becomes the same as" is "gets".
- ivyirwin 9y agoMy CS professor (~ola) taught it as "gets" and to this day when I talk out code people get confused. I'll say, "x gets 3" and they look at me funny. But I find it helpful for differing between assignment and equality.
- noonespecial 9y agoI never liked the 'gets': "x gets 7" is fine but "x becomes the same as y" seems better than "x gets y"
- gowld 9y agothat's wrong, though. x becomes a copy of y, which is only transiently the same.
- dmichulke 9y agoWhat is "transiently the same"? Genuinely asking - my first thoughts are: "transiently the same" is not the same as "the same", hence it is not "the same", and therefore "not the same". No jokes on the meta-level please :o)
- Y_Y 9y agoDepends on the language, and the types of x and y. See e.g. python.
- efitz 9y agoI was taught to read it as “takes the value of”.