HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by keymone | Hacker News Reader
Full thread
keymone
·
solution: don't have assignment operator.
View on HN
imglorp
·
Or even use plain old := for assignment to help avoid confusion with ==. I wonder if K & R wanted to save a character for terseness. I mean, these are the guys who said, if they were writing Unix again, would "spell creat with an e."
https://en.wikiquote.org/wiki/Ken_Thompson
frou_dh
·
T&R are the originators of Unix and C. Kernighan seems to often unwittingly be given Thompson's achievements!
kd0amg
·
Or use ML-style reference cells, so that assignment cannot work on two things of the same type.
pluma
·
Now you're thinking with ~portals~ monads.
joombaga
·
HN doesn't support markdown strikethrough, but here's the text in unicode:
p̶o̶r̶t̶a̶l̶s̶
pluma
·
That seems like it would cause problems with screenreaders though.
Reply on news.ycombinator.com