5 ms·
Author here. Part of my point here is 1) you get a lot of benefit from dynamic languages, and 2) you also get a lot of benefit from functional programming. And
by bslatkin 4y ago
Author here. Part of my point here is 1) you get a lot of benefit from dynamic languages, and 2) you also get a lot of benefit from functional programming. And 3) you'd get the most benefit from both together. When you add types into the mix then you're taking two steps forward and one step back in terms of simplicity and understandability.
What you said is also perpetuating a common reason that people are turned off to FP in general these days:
https://twitter.com/haxor/status/1584725493513072640 https://twitter.com/haxor/status/1584725493513072640
"At some point functional programming became equivalent in people's minds to complex type systems (e.g., monads), and that caused the value of Lisp to be lost to history. It's a shame."
- bitwize 4y agoI don't know what you're getting at. Static typing makes your code easier to understand and reason about. It's pretty much an unmitigated win. Dynamic languages may have made some sense back when people wanted to cruft something up and get it running without declaring the type of each object before it is used (which declarations can get verbose and cumbersome in the presence of parameterized types). But today we have powerful computers that can quickly check and infer types in ever more elaborate type systems, and the risks of dynamic languages seem less and less worth the development speed gains. You can see this in perennial language popularity contests. Consider how thoroughly the programming community embraced TypeScript over JavaScript because of the guarantees static type checking provides before your code even runs. And while Lisp used to be the smart kids' favored programming language, it was displaced by Haskell and later by Rust once those languages matured to where people were building real world stuff in them. (As it turns out, baking object lifetimes and ownership into your type system means you don't even need a GC to get Lisp levels of power and abstraction!)
- grumpyprole 4y ago> "At some point functional programming became equivalent in people's minds to complex type systems (e.g., monads), and that caused the value of Lisp to be lost to history. It's a shame." This is nonsense. Types help us name, categorise, discuss and share abstractions. These abstractions are useful in any language, typed or otherwise. Lisp lives on in its descendents ML and Haskell. If someone doesn't want to learn anything new, then they are themselves "lost to history".
- TurboHaskal 4y agoI program in both Lisp and SML/OCaml. I don't think Lisp lives in the latter. For me, Lisp is about power. However, Haskell and other languages that popularized category theory feel like going through the GoF nightmare again.
- grumpyprole 4y agoSML/OCaml has built-in cons lists and is great for symbolic manipulation. Everything is an expression and there's too many parens.
- epgui 4y agoI'm a big fan of Clojure (dynamic FP) and have worked with it professionally, but I really don't see why types seem to be so cumbersome. I hate languages like C#/Java, but not because types are cumbersome. You play around with something like Haskell (and its type system) and it's a whole other story.