3 ms·
Many Common Lisp implementations also lack TCO. That said, I do agree that you probably shouldn't go crazy with FP in Python. At its core, it's a procedural la
by bunderbunder 8y ago
Many Common Lisp implementations also lack TCO.
That said, I do agree that you probably shouldn't go crazy with FP in Python. At its core, it's a procedural language. It has some useful things from OO and FP, but you'll be more comfortable if you keep procedural techniques in the top tray of your toolbox.
Which isn't all that bad a thing. IMO, well-done modern procedural programming looks a lot like functional programming with more loops and less recursion.
- wybiral 8y agoCommon Lisp is one of the least "functional" of the major lisp dialects too. Without TCO you generally need state for iteration. That being said, I agree, there's nothing wrong with taking aspects that you like (first-class functions mainly) without having to be a purist. In fact, imo purely functional languages are tedious compared to procedural languages like Python.
- bunderbunder 8y agoThat said, the ML/Haskell-like functional languages do have one thing that most procedural languages do not, which is that they help you keep side effects under control. I'd like to find a procedural language that allows for side effects (it is still procedural programming, after all), but encourages keeping them under control. I've been toying with Nim lately, and it's been a good experience. I think that it's possible to do even better, but it's already way ahead of anything else I've tried.