5 ms·
> How about Erlang. Let's try it, just from the top of my head. Erlang isn' purely functional language in the same sense as Haskell is. It's much more mainstre
by solomatov 12y ago
> How about Erlang. Let's try it, just from the top of my head.
Erlang isn' purely functional language in the same sense as Haskell is. It's much more mainstream compared to it.
Clojure has even less of it. It's basically LISP which is about 60 years old.
- rdtsc 12y agoWell OP asked about Clojure so Erlang fits the profile. But you make an interesting point in a way. One can ask, ok here are two non-strictly functional languages that seem to be fairly practical. Used for large distributed mission critical systems. Would they be better off written in Haskell? Would they have been written at all if creators only knew about Haskell? How large is the relationship between fault tolerant and safe systems as a product vs strong compiler type safety in the language it was written.
- solomatov 12y ago>But you make an interesting point in a way. One can ask, ok here are two non-strictly functional languages that seem to be fairly practical. Used for large distributed mission critical systems. I think there're at least these problems with Haskell: * The language is badly designed. See the number of extensions which aren't standardized but widely used. See also obvious problems such as requirement to use renames when importing code, and problem with record names conflicts which isn't solved for years. * The focus of the language isn't correct. Lazy evaluations creates a lot of problems both in program performance and complexity of the compiler. The most important parts are pureness and side effect control. * The language is already obsolete. Many its constructions and related complexities are redundant if we unify type and expression level, and get as a result dependently typed system. I hope some language in the future will implement these ideas, and we will have a widely used pure functional dependently typed language with explicit control of effects. I see two candidates for such a language: * Pure script - it's Haskell done right, compiledd to JS. Unfortunately, it doesn't support dependent types. * Idris - it's the language which I describe, but I fear that it's impossible to create a widely used commercial language without major industry players' support.
- mightybyte 12y ago> the number of extensions which aren't standardized but widely used. Actually, I think this is something that Haskell did right. It allows experimentation with new language ideas in a way that allows them to be tested safely with existing codebases. Edward Kmett recently had this to say about it: > I appreciate Haskell's willingness to take a very very long view, and explore the design options, before committing to a path. In many ways, it is this feature of our community and our language that keeps other programming languages looking to us for features and designs to steal. > The language is already obsolete. By that argument so are C, C++, Java, etc. But it's about the existence of a mature ecosystem, not about what is theoretically known. > Pure script PureScript is great, but its compile to JS basis makes it inappropriate as a general purpose language. > Idris Idris looks promising, but it doesn't have a large enough ecosystem yet. I would certainly be willing to switch from Haskell to Idris in the future, but Haskell already is at least a little bit dependently typed [1] and as hinted at above I wouldn't be surprised if Haskell is able to continue improving its dependent typing capability as research advances. [1] https://www.youtube.com/watch?v=OZWYohmLKuU https://www.youtube.com/watch?v=OZWYohmLKuU
- seanwilson 12y agoGiven that not even basic functional programming has become popular yet, I can't see dependent types being widely adopted for decades. The learning curve for using dependent types is incredibly steep and capturing interesting properties in types inevitably requires you to understand and write tricky maths proofs.
- solomatov 12y ago>Given that not even basic functional programming has become popular yet. It's already popular. All the mainstream programming languages already support it.
- seanwilson 12y agoWhich languages would you say this was true for? I wouldn't say that was the case until there is wide support for algebraic data types, type inference, pattern matching and immutable data. I see more languages allowing functions as parameters, basic type inference and encouraging immutable data, but they're still missing out on a lot of benefits offered by functional languages like Haskell and OCaml by ignoring these features. I do see functional programming features making their way in to imperative languages but most people are still coding in an imperative way. Mutable data is still the default rather than immutable data for example.
- deleted 12y ago[deleted]