3 ms·
Maybe because there are a lot of times where it really is more convenient to just update a variable or print a string instead of jumping through a million hoops
by c_crank 3y ago
Maybe because there are a lot of times where it really is more convenient to just update a variable or print a string instead of jumping through a million hoops to show off how pure everything is? Or we just want to implement quicksort without having a seizure?
- jononomo 3y agoOk, you prefer to deal with entire classes of bugs in order to keep using objects because you incorrectly think that objects model the world better. I used to have the same perspective, and all I can say is that you'll either grow out of it or you won't.
- jononomo 3y agoP.S. The world is not made of objects -- this classic essay is perfect on the subject: https://www.eecis.udel.edu/~decker/courses/280f07/paper/KingJava.pdf https://www.eecis.udel.edu/~decker/courses/280f07/paper/King...
- c_crank 3y agoObjects aren't an ideal tool for modeling the world, and immutable objects and variables even less so. Objects and classes often come in handy for modeling something obviously fake, like a video game. I've never thought, 'Gee, this game would be so much easier to program if I had to copy every data structure when I wanted to update it, and have programs be impossible to step through because I'd rather write a pure program with no good debugging tools just to sound cool.'
- jononomo 3y agoIt is interesting that you think functional programming is somehow more difficult or less powerful than object-oriented programming. I have found the opposite to be the case. Functional programming makes it easier for me to debug programs, frankly. That's why I like it. Once I got the hang of it it honestly felt like a huge weight off my shoulders.