Re:So You Think You Can Program an Elevator
by emonidi on Wednesday January 13, 2016 @03:31PM
(#10897248)
1. Because maybe the author wanted to keep the property hidden and only expose a getter function and hide the setter?
2. Same reason. They are being set internally. A sane programmer would not give you the power to do that because its a product of internal calculations.
3. Naming of method/function and variables is the second hardest thing in programming :)
4. The callback of on.('floor_button_pressed') gives you an floorNumber argument which is more than sufficient. What event in real life would you describe with on('in-droor-button-press') ?
[ Parent
| on HN ]
There are no comments on this comment yet.