Hacker News new | ask | show | jobs
by groundCode 1942 days ago
Pascal was the first language I learned. I don’t remember my ch of it but I always liked := for variable assignment
4 comments

I disliked it. Assignment happens more often than comparison, so it makes sense for assignment to have the shorter symbol (Shannon would agree). := may make more sense for students, but maybe not for professional programmers.

Then I injured a the little finger on my left hand. And then I loathed :=, because I had to get to the left shift key to type the :, over and over and over, and I couldn't use my left little finger to do it. (If you're a professional programmer, you may not think of yourself as a person who works with your hands, but you do.)

At least it is not “equal” which is conceptually confusing in many other languages .
Same as me. I really liked that too. I always read it as x becomes equal to y.
The sheer amount of bugs that could be avoided by using := in let's say C!

if (a = b) c=1;

oh boy... :)