6 ms·
As I said elsewhere, the main contribution of Haskell is the science of programming languages. Without Haskell, we would be stuck with "practical" or "pragmatic
by choeger 6y ago
As I said elsewhere, the main contribution of Haskell is the science of programming languages. Without Haskell, we would be stuck with "practical" or "pragmatic" languages like C or Java that do not care much about soundness. Haskell is the science to Rust's engineering, IMO.
- johnnycerberus 6y ago> Haskell is the science to Rust's engineering, IMO. Wut? Rust doesn't have the purity and the capability to isolate side-effects that Haskell has. Rust is popular because of its ownership model that got into the mainstream. We still don't know what are the costs of it. The only similarity between them is that both are statically typed, expression based languages (ex. Scala, Ruby, Wolfram, LISP) and moved the task of proving stuff from analysis tools to the programmer. But that doesn't mean that Haskell "is the science" behind anything. For what it's worth, Rust is closer to the ML (OCaml) family than Haskell, focusing on performance rather than purity. Though that is also debatable since it doesn't feature a GC and comes with zero-cost abstractions. Rust has its very own merits. I'm eager to see how it will evolve and what hidden costs will be uncovered.
- pjmlp 6y agoFor me the biggest merit Rust brings into the table is that affine types got out of the research lab, and now everyone is looking at ways to balance GC with affine types in most mainstream languages.
- johnnycerberus 6y ago> now everyone is looking at ways to balance GC with affine types in most mainstream languages. Sounds interesting, do you have some links on this topic?
- pjmlp 6y agoSure, several Swift https://swift.org/blog/swift-5-exclusivity/ https://swift.org/blog/swift-5-exclusivity/ https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md https://github.com/apple/swift/blob/master/docs/OwnershipMan... D https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in-d/ https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in... Haskell https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types Chapel https://chapel-lang.org/docs/technotes/lifetimeChecking.html https://chapel-lang.org/docs/technotes/lifetimeChecking.html ParaSail https://adacore.github.io/ParaSail/ https://adacore.github.io/ParaSail/ Ada/SPARK 2014 proposal https://www.adacore.com/uploads/techPapers/Safe-Dynamic-Memory-Management-in-Ada-and-SPARK.pdf https://www.adacore.com/uploads/techPapers/Safe-Dynamic-Memo... Pony https://tutorial.ponylang.io/reference-capabilities/reference-capabilities.html https://tutorial.ponylang.io/reference-capabilities/referenc... Verona (very early stages) https://www.microsoft.com/en-us/research/project/project-verona/#!talks-workshops https://www.microsoft.com/en-us/research/project/project-ver...
- scns 6y agoNiko Matsakis wrote his thesis in Scala IIRC. So Scala might have better shot at "the science behind Rust".
- Ar-Curunir 6y agorustc was originally written in Ocaml. Rust just has lots of influences :)
- pjmlp 6y agoAs if Ada, Standard ML, Modula-3 weren't there first. When I learned those, Haskell was still Miranda.
- johnnycerberus 6y agoSML inspired many languages: Elm, F#, F*, OCaml, Python, Rust, Scala, Modern Java(which looks more and more like an OCaml on the JVM), Julia I really don't know why people think Haskell is the pinnacle of everything in PL design.
- pjmlp 6y agoHaving learned programming in those days, it feels really weird that now is fashionable to assert that Haskell === FP.
- mrkeen 6y agoI can explain it this way: If you were a Java/C/C# programmer in the 2000s, you missed out on: * lambda abstractions * Generics (prior to 2004) * Higher-kinded Generics * Primitives in Generic collections * no nulls * do-notation * ML type system * global, decidable type inference * Pattern matching * Functions as first-class objects * Currying * And most importantly *side-effect-free* functions As a someone who picked up Haskell around 2010 as my first functional language, I liked what I saw, and I assumed that other functional languages were probably similar. My inner evangelist was all "You should use FP instead of Java, because lambdas are ergonomic", "You should use FP because nulls are bad", "You should use FP because functions are easier to test than methods". Over the last decade I've realised that those statements aren't really truthful. Many functional languages allow null. Many functional languages won't enforce side-effect-free functions for you. So it was never really about FP, it was about Haskell. Anyway, that's how they got conflated in my mind.
- Ar-Curunir 6y agoSML has many of those features. Sure, Haskell popularized them, but it doesn't mean that computer scientists began studying these concepts only after Haskell became a thing
- Ma8ee 6y agoWhat is genuinely new in Haskell that didn’t already exist in academic languages in the eighties?
- kryptiskt 6y agoType classes and monadic IO (and having a type system being able to express monads as a thing).
- AnimalMuppet 6y agoDidn't stuff in the 80s have the ability to express monads, but nobody had yet realized that they were useful?
- kryptiskt 6y agoYou can express particular monads, but to have a Monad class/trait for all monads you need first class type constructors (also known as higher-kinded types), and that is not common even today.
- momentoftop 6y agoSML has always let you abstract over type-constructors using modules, and it was always routine to do so. You can express monads abstractly in this way, and some people have (Ocaml, but the SML is the same modulo syntax): http://batteries.forge.ocamlcore.org/doc.preview:batteries-beta1/html/api/Monad.S.html http://batteries.forge.ocamlcore.org/doc.preview:batteries-b... But the sort of code you would write in Haskell gets very noisy without typeclasses, and it's just not an obviously good way to program in a language that's intended to be impure and strict.