5 ms·
Lisp has always seemed like the most teachable FP language to me. I imagine it would be hard to start elsewhere.
by Igelau 5y ago
Lisp has always seemed like the most teachable FP language to me. I imagine it would be hard to start elsewhere.
- cerved 5y agoHaskell seems like a terrible language to start with
- wyager 5y agoDisagree. I think it’s a lot easier to learn than something like C++ or Java, which a lot of people start with. People just tend to forget how much they struggled with these very complicated languages when they were getting started.
- abeppu 5y agoYeah, it seems weird that the author latched onto some things as part of their definition of "functional programming" which aren't really required. I still find SICP to be an impressive self-contained foundation for functional programming, and "Functor" and "Monad" aren't mentioned as named concepts. Is there a better name for the domain the author is talking about? "Type-driven functional programming"?
- valenterry 5y ago> Yeah, it seems weird that the author latched onto some things as part of their definition of "functional programming" which aren't really required. They are required when taking the original meaning of functional programming though (nowadays often called "pure functional programming" to differentiate it).
- yawaramin 5y agoThat's not the 'original definition' of functional programming though.
- valenterry 5y agoThen what is it?
- yawaramin 5y agoWell, it varies from source to source. E.g. if we look at John Hughes' working definition from his 1984 paper 'Why Functional Programming Matters', then functional programming is programming with only pure functions with no side effects, assignment, or mutation. No mention is made of 'monad' or 'functor'. The rise of effect handling systems like monads in functional programming languages since the oughties was driven by the real-world need to, well, print 'Hello World' to the screen. And different practitioners have different opinions on how far to take effect management. Haskell is just one extreme, but there are several FP languages on the spectrum.
- valenterry 5y agoFair enough, my bad - that definition is what I use as well. I think I got a bit stuck up when OP said "aren't really required", because for the definition that's true, but for real world usage, it is required in pretty much every pure FP language that I know.
- rightbyte 5y agoFP with dynamic scoping? Lisp is not a FP language anymore than C.
- Jtsummers 5y agoSure it is. Using the "Appeal to Wikipedia Fallacy": https://en.wikipedia.org/wiki/Lisp_(programming_language) https://en.wikipedia.org/wiki/Lisp_(programming_language) Most Lisps are multiparadigm, covering at least the functional and procedural paradigms. Going to Common Lisp you can add OO to the mix. It is a severely constrained notion of FP that manages to exclude the first functional programming language from its definition.
- erik_seaberg 5y agoLisp is very old; it started out competing with languages lacking even reentrant function calls. Lisp had a lot of good ideas and a few poor ones from that era. As compilers improve, it becomes feasible for languages to only provide pure functions, lazy evaluation, and immutable data structures even on the same old imperative CPU cores.
- Jtsummers 5y agoDoes that make Lisp somehow not a functional programming language? That other languages have been developed to provide features that most lisps do not does not remove them from the group of functional programming languages. It just means they're part of a different branch of the same paradigm.
- erik_seaberg 5y agoIt’s pretty easy to write Lisp “functions” that are not actually functions because they invisibly depend on each others’ side effects. The goal of FP is to prevent that.
- theCodeStig 5y agoLISP is a family of languages. Some LISPs are functional (Scheme languages), some are not (Common Lisp).