4 ms·
solution: don't have assignment operator.
by keymone 7y ago
solution: don't have assignment operator.
- kd0amg 7y agoOr use ML-style reference cells, so that assignment cannot work on two things of the same type.
- imglorp 7y agoOr 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 https://en.wikiquote.org/wiki/Ken_Thompson
- frou_dh 7y agoT&R are the originators of Unix and C. Kernighan seems to often unwittingly be given Thompson's achievements!
- deleted 7y ago[deleted]
- pluma 7y agoNow you're thinking with ~portals~ monads.