Live data from Hacker News

Haskell for a New Decade [pdf]

dev.stephendiehl.com

31–40 of 190 posts

Re: Haskell for a New Decade [pdf]

#31

I think the focus on Haskell is missing the mark a bit. Haskell is about programming language researchers and enthusiasts having a excellent example language to try out ideas. Over the years it has turned into a production ready platform. As the PDF shows there are many languages spun off Haskell and it doesn't even mention them all. Then there are language features in C# and Java, Typescript etc. that are coming acr…

I can't speak for everyone but for me the type system is not what made Haskell difficult. I loved it. What made it difficult was laziness. I'd find myself always trying to reason about execution (even though most of the time you probably shouldn't). Laziness might even be fine in a world built around it, but for a language to be practical it has to interface with systems that are not designed that way (numerous exter…

Is laziness at all related to IO/effects libraries in Scala like cats-effect or zio? Like where you have to switch your mental model to view a program as something that just describes an eventual outcome but doesn't actually "do" it until some last-minute side effect thing that is bolted on?

Re: Haskell for a New Decade [pdf]

#33
post #12
post #7

Earlier quoted context omitted.

As a Rustacean, I find that silly. There's a lot to love about Haskell. I'd be interested in hearing from your Haskellers what it is about Rust that renders Haskell obsolete. As it stands, I can only construct straw men, and I'm not really willing to do that.

From the pure language perspective (i.e. batteries aside), what do you miss in Rust from Haskell?

Everyone else pretty much said it for me. To elaborate more personally: the distilled expression of pure functions as _the_ basic entity of modular engineering is such a huge selling point for me. Lazy evaluation is also surprisingly valuable in this vein, because I can compose components -- pass the output of a component to the input of another -- with the assurance that I'll only pay for that computation if it's actually requested.

I do deeply appreciate Rust in how it supports serious functional programming idioms without requiring a GC. The value of immutable-by-default and single-ownership semantics have been infectious far beyond my direct use of Rust. But those very same features of Rust also make the pure function just a little more clunky in that environment.

Oh, and being literally unable to perform I/O (or any other computational effect) outside of the right context is such a clear win for me. Very few languages, even in the functional world, have such a strict separation. The architectural and mental benefits are outstanding.

Some concepts take on a surprisingly simple existence in Haskell. I recently discovered the Yoneda and codensity transformations, as so frequently discussed in Haskell... in the context of a Visitor pattern on a tree structure in Java. Visitors are literally Yonada-ified sum types, and I could only make that connection (and understand the ramifications and benefits) after seeing how it naturally arises in both languages.

Re: Haskell for a New Decade [pdf]

#34

I think the focus on Haskell is missing the mark a bit. Haskell is about programming language researchers and enthusiasts having a excellent example language to try out ideas. Over the years it has turned into a production ready platform. As the PDF shows there are many languages spun off Haskell and it doesn't even mention them all. Then there are language features in C# and Java, Typescript etc. that are coming acr…

> Then there are language features in C# and Java, Typescript etc. that are coming across from Haskell. What language features in Java came from Haskell?

Lambdas?

Re: Haskell for a New Decade [pdf]

#35
post #12
post #7

Earlier quoted context omitted.

As a Rustacean, I find that silly. There's a lot to love about Haskell. I'd be interested in hearing from your Haskellers what it is about Rust that renders Haskell obsolete. As it stands, I can only construct straw men, and I'm not really willing to do that.

From the pure language perspective (i.e. batteries aside), what do you miss in Rust from Haskell?

I've used both extensively, even on some similar projects. Biggest thing I've noticed with Rust is that—often by necessity—it's hard to design abstractions that don't leak implementation details. That's a fundamental property of how Rust uses its types to manage resources, and it can definitely pay off for some kinds of code with particular performance requirements. In practice, though, it also makes it much harder to write reusable abstractions, especially with anything involving first-class functions and polymorphism.

The upshot is that the two languages feel very different, encourage totally different programming patterns and give you different high-level trade-offs. They're far more complementary than substitutable, and I expect my future projects will mix and match both.

Re: Haskell for a New Decade [pdf]

#36

Earlier quoted context omitted.

> Then there are language features in C# and Java, Typescript etc. that are coming across from Haskell. What language features in Java came from Haskell?

Lambdas?

But those were popular and common before Haskell. Why would we say that lambdas spun off from Haskell to Java, rather than they were spun off from ML, or Miranda, or from Lisp?

Re: Haskell for a New Decade [pdf]

#37

I think the focus on Haskell is missing the mark a bit. Haskell is about programming language researchers and enthusiasts having a excellent example language to try out ideas. Over the years it has turned into a production ready platform. As the PDF shows there are many languages spun off Haskell and it doesn't even mention them all. Then there are language features in C# and Java, Typescript etc. that are coming acr…

Counter point on "investment":

I was in a Haskell team at Google, and have trained groups at various companies professionally. From that experience, for a normal developer with working experience in Java, Python, or C++:

* It takes 2-3 weeks of full-time onboarding (half with a coach, half self-study) to work on a typical industrial Haskell project.

* It takes around 3 months of full-time participation in such a project to know a wide array of libraries and feel ready to tackle almost anything.

The companies involved were happy to make this time investment for increased productivity over the time they expected their employees to stay with them.

On an individual level, it makes sense that if you're just getting into programming, and you have the choice between investing 2 weeks into Python to be productive, or 3 months for Haskell, you pick Python. It's rational. But after you've been in it for a few years, and you realise you want to do it for another 40 years, investing 3 months for life-long increased productivity (even if it's just a few percentage points; most feel the effect is larger) suddenly becomes a great deal.

Counter point on "complex topics":

After 6 years of industrial Haskell, I know nothing about category theory. It has not prevented me from using web frameworks.

Re: Haskell for a New Decade [pdf]

#38

I've been writing Haskell professionally for 5 years now and as a hobbyist even longer and this presentation just doesn't resonate with my experience and view towards the future. That said I've taken my focus off working in it professionally. It's such a chore to have to constantly justify it to newly-externally-hired management and inevitably get a top-down directive to rewrite. I'm done relying on managers and corp…

What kind of production systems are a good fit with Haskell? I've wanted to learn Haskell but keep getting distracted by other shiny things that are more directly applicable to my job.

Services. Websites. Here is a reasonable breakdown for more info

https://github.com/Gabriel439/post-rfc/blob/master/sotu.md

Re: Haskell for a New Decade [pdf]

#39

I've been writing Haskell professionally for 5 years now and as a hobbyist even longer and this presentation just doesn't resonate with my experience and view towards the future. That said I've taken my focus off working in it professionally. It's such a chore to have to constantly justify it to newly-externally-hired management and inevitably get a top-down directive to rewrite. I'm done relying on managers and corp…

What kind of production systems are a good fit with Haskell? I've wanted to learn Haskell but keep getting distracted by other shiny things that are more directly applicable to my job.

General purpose "cloud" software is what I've worked on.

Compilers and interpreters. They don't have to be CLIs though. You can create languages to configure said cloud software :)

Re: Haskell for a New Decade [pdf]

#40

Earlier quoted context omitted.

Lambdas?

But those were popular and common before Haskell. Why would we say that lambdas spun off from Haskell to Java, rather than they were spun off from ML, or Miranda, or from Lisp?

I can’t say really, but my recollection is that the last decade of higher interest in FP has had Haskell as a fixture, and was significantly sparked by the need to program in a multi core world, and parallelization is made significantly simpler in the context of pure FP and controlled side effects.

I hear you though. I was mostly a lisp person and only really got into Haskell in the last couple of years. Even still I would have said that the FP zeitgeist had Haskell as it’s central example of FP.

Post reply on HN