Hacker News new | past | comments | ask | show | jobs | submit login

This is why a certain language used := as the assignment operator and = as the boolean equality operator. It really doesn't make sense as written when compared to all of the maths people have learned up to the point they are introduced to programming. It's where learning about addressable memory and pointers compared to the values stored at those addresses actually made more sense to me than the optimized syntax (at least when I was 12 or so). It also operates backwards in most languages, where the stuff on the right of the equals happens before the stuff on the left. It really should be something that reads as "take the value in box with address x, add one to it, and store the value back in the box with address x" (basically show the student what the assembly language looks like).

I really don't have a problem with people not getting x=x+1, I think it shows someone is actually trying to deeply understand what is going on.




This is one of the advantages of using Scheme as an introductory language: (define x 1) (set! x 2) (let ((x 3)) (1+ x)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: