3 ms·
Agreed. I think the point of learning multiple paradigms is so that you can recognize when idiomatic programming in your preferred (or employer-mandated) langua
by sethg 18y ago
Agreed. I think the point of learning multiple paradigms is so that you can recognize when idiomatic programming in your preferred (or employer-mandated) language is not the best way to get the job done--recognizing when it's time to write functional-style code in Python, OO-style code in Haskell, or whatever. But most of the time, you follow the grain of the language.
- silentbicycle 18y agoAbsolutely. Some languages comfortably support several paradigms, of course (http://www.c2.com/cgi/wiki?MultiParadigmProgrammingLanguage http://www.c2.com/cgi/wiki?MultiParadigmProgrammingLanguage).
- sethg 18y agoI think any non-toy language needs to make it non-painful to program in several paradigms, but I'm not sure about the "comfortably" part; it's good for a langauge to be designed around a central paradigm that can work for most tasks and that the implementor can optimize for. So Python is OO and Haskell is functional, and there are many problems that you solve in an OO style when writing Python and a functional style when using Haskell, and that's OK. And every once in a while you need to write functional-style code in Python, or OO-style code in Haskell, and that's OK too. I'm OK, you're OK, we're all OK....