4 ms·
Kahn makes a big mistake in pronouncing the assignment operator as "equals" in the first video. The assignment operator should be pronounced as "gets".
by jcampbell1 15y ago
Kahn makes a big mistake in pronouncing the assignment operator as "equals" in the first video. The assignment operator should be pronounced as "gets".
- llimllib 15y agoWhen I read it in my head, I read it as "let". As in "x = 5" -> "let x be 5".
- pjscott 15y agoIn my head, I reserve the word "let" for immutable bindings. Or at least local bindings that people probably aren't going to mutate. I read it as "x equals five". So, between three of us, we saw that simple line of code in three different ways. I wonder what other people see in more complicated code.
- jcampbell1 15y agoThe point is that if you pronounce if(x=5) and if(x==5) both as "if x equals 5", then you are making things confusing for students. You as the teacher are saying the exact same words, but mean two completely different things. Kahn made this mistake and there are student comments showing the confusion. Not correctly understanding assignment is one of the biggest failure points for beginners learning programming. The '=' operator has little relation to '=' in any form the students have encountered before. It means something like "evaluate the shit on the right hand side, and store it in a variable with the name on the left hand side". That meaning is not really even close to the meaning of the english word "equals". You can personally call it whatever you want, but if you want to be a good teacher to beginning programmers, then you don't call both = and == the same thing. "x gets 5", "set x to 5" or "x is now 5" are all acceptable, but "x equals 5" is not acceptable for teaching purposes.
- loup-vaillant 15y agoI note that the biggest mistake probably comes from C itself. If only it had chosen for assignment a syntax such as : x <- 5; It would be more clear that "the shit on the right" goes to that garbage on the left. But no, they had to use the `=` sign, as if saving one character where more important than not changing the meaning of one of the most used sign of all mathematics. And now nearly all popular language is making the same damn mistake.
- llimllib 15y agoThe only thing I liked about PL/SQL back in the day was its use of := for assignment and = for equivalence.
- pjscott 15y agoI pronounce "==" as "equalsequals", sort of slurring the two words together for speed, so they sound like all one word. This is consistent with the way I treat the bitwise-versus-boolean operator confusion, e.g. "&" is "and" while "&&" is "andand". I agree with your main point, though, that failure to understand assignment is one of the biggest failure points for beginners. What programmers need to be able to do is trace through the execution of a program in their head, thinking "once this statement executes, the state will change in so-and-such way." If I had to teach introductory programming again, I would focus more on having people fiddle around with variables in a REPL, just to get a feel for that sort of thing.
- nosignal 15y agoI think I'm going to steal this for my Python classes. I usually say "is" or "is now", but "gets" I think is a more adroit phrasing. Cheers.
- radq 15y agoPersonally I prefer "becomes". "David Gries recalled a time when he was lecturing with Dijkstra in the audience when he read "x=a" as "x equals a". This is of course a short hand for "assign a to x" and not a statement that x really is logically equal to a. From the back of the room Dijkstra shouted "becomes" and the room fell silent. Gries thought about it for a moment and said, "Thank you Edsger, for correcting me. If I make the same mistake again, stop me." Everything went fine until twenty minutes later he made the same mistake when the shout from the back of the room came again - "becomes". Gries once again thanked Dijkstra and claims to never have made the mistake again."
- teach 15y agoI also say "becomes".
- regularfry 15y agogets is, unfortunately, a common function name for string input, so I avoid it. The first language I was taught was Object Pascal, and the assignment operator ":=" was pronounced "becomes equal to".
- thy 15y ago'x equals 5'. or something like 'the value inside x is now 5', an important view for me, when was learning c++'s pointers.
- thy 15y ago(idk how to edit) im just fine with 'x = 5'. lets see 'x = 1+1'. then the 1+1 will be 2, and then that value will be in 'x'. so, after that, 'x equals 2', right? or 'x equals 1+1'.