Live data from Hacker News

Haskell for a New Decade [pdf]

dev.stephendiehl.com

171–180 of 190 posts

Re: Haskell for a New Decade [pdf]

#171

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…

> How do we make immutability easy and ergonomic and get rid of nulls in C#? Can we have guarantees in our program. There are even features not in Haskell proper like Liquid Haskell that would be interesting to have in C# or Typescript.

Will any of that be enough to bring the refactoring powers of Haskell? I bet not, you need the entire type system for that, and if you bring the entire type system, your language will become as hard to learn as Haskell.

Without the refactoring powers, you are stuck again into the old school "design it well or you'll suffer" development cycle.

Re: Haskell for a New Decade [pdf]

#172
post #97

Earlier quoted context omitted.

Haskell does have an issue of people using it being more interested in doing clever things and researching topics than building cool applications. Haskell jobs do exist, I have one of them. The big problem is that there are more people who want to do those jobs than there are jobs, so they seem very scarce. But anyway there are also a number of investment banks I have heard that use Haskell as their “secret weapon” a…

> use Haskell as their “secret weapon” and do not advertise it, in fact those who could speak to details are all under NDA. I remember hearing this said about Perl back in the day! Language X is so awesome businesses use it in secret because they don't want their competitors to discover the secret to their success. Not saying it couldn't happen, but you can say it about any language and it can't really be disproven.

Not only can you, it is standardly asserted about a variety of obscure, fun languages. Lisp, APL, and J/K spring to mind.

Re: Haskell for a New Decade [pdf]

#173
post #140

Earlier quoted context omitted.

Right. It’s frustrating. I’m not under NDA with them but I don’t want to get anyone into trouble, but even if I did name names I don’t think anyone would back it up. This is why we need more publicity-visible Haskell success stories.

If the "secret weapon"-theory is true, then I guess the companies loudly proclaiming they use Haskell could just be trying to trick their competitors into using it...

Yeah I mean you can take it a lot of ways lol. I think some companies are just secretive about their practices and others are open.

Really the thing that convinced me to really dig into haskell was that there were so many things that I wanted to learn but so much of the extra information had roots in haskell topics. So i basically said "to achieve my goals I need to know haskell even if i never use it for anything practical".

Slowly, as I learned more, I realized it is great. I wish I had chosen to learn haskell 10 years ago instead of like two years ago.

Re: Haskell for a New Decade [pdf]

#174
post #159

As a seasoned C++ programmer, that occasionally plays with Haskell, here is a question? Has finally Haskell the problem of how to do destructive updates or not? If it cannot do destructive updates, I am not interested. The kind of software I am called to build always requires destructive updates for performance reasons and secondly I am so used to assignment and all the design patterns around it that I don't think I…

Haskell can do destructive (in-place) updates via various forms of mutable variables (e.g. IORef).

And mutable arrays: https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-...

Re: Haskell for a New Decade [pdf]

#175

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.

Haskell won't give you high interactivity (on the milliseconds of response time), or C-like performance. It will make it hard to control low level details of your memory and execution path. It will also not bring a lot of gain if you only have homogeneous data (like in machine learning).

If you have a problem where intermediate performance (on the level of Java and .Net, better than Python or JS) is ok and people won't notice 100ms extra here and there, Haskell is viable. If it's not focused on low level IO, and deals with complicated stuff, odds are it's your best option right now.

Re: Haskell for a New Decade [pdf]

#176
post #121

Earlier quoted context omitted.

Nested nullable types collapse to the same type, meaning it's very easy for generic code to contain really subtle bugs. If you have some generic code that has a T? and assumes that whenever it is null it is not T, this assumption will be almost correct and very easy to miss during testing. Also, it's very common to have option-style code and as your code evolves you need to refactor it to either/result-style code (th…

For me, there are two killer reasons for Kotlin to handle nullability as it does: smooth host platform interoperability and zero overhead. The existing huge mass of JVM libraries use null, so by embracing that rather than adding a new wrapper object like Scala's Option (or even JDK 8+'s Optional), Kotlin works smoothly with all those libraries. And with some annotations, Kotlin's nullability support can be applied to…

I agree Kotlin has a sweet spot in JVM language design.

Re: Haskell for a New Decade [pdf]

#177

Earlier quoted context omitted.

The types of posts that get downvoted on here is at times maddening. This to me, is the only reply thus far that addresses what I also perceive to be the fundamental problem with Haskell - it doesn't provide any new convenient tools to solve real world problems, while requiring one learns a bunch of useless abstractions that aren't used anywhere else in industry as a default (monads, laziness, immutability)

(It's a HN rule not to discuss down votes) However the problem with the parent post of that it presumes Haskell isn't useful because of X, when clearly it's useful for many and changing X would make it not Haskell. That sort of comment isn't useful. I think for as long as I have known Haskell (1992-) there has been interest in and a desire for a strict variant of Haskell. In 2020 it seems there are a lot more options…

> “ changing X would make it not Haskell”

this seems like some version of a No True Scotsman argument.

Re: Haskell for a New Decade [pdf]

#178
post #51

Earlier quoted context omitted.

The types of posts that get downvoted on here is at times maddening. This to me, is the only reply thus far that addresses what I also perceive to be the fundamental problem with Haskell - it doesn't provide any new convenient tools to solve real world problems, while requiring one learns a bunch of useless abstractions that aren't used anywhere else in industry as a default (monads, laziness, immutability)

"Favor Immutability" - Effective Java, circa 2001 Should not be controversial at this point.

Immutability is great. What does that have to do with Haskell?

Re: Haskell for a New Decade [pdf]

#179

Actual presentation should show up on this channel soon, as it's where this talk was given: https://www.youtube.com/channel/UCNp-DVb8cQRIOo32sZhWgNg/vid...

Ah here we go, actual presentation video has been posted: https://www.youtube.com/watch?v=B9_xAixGlmk :)

Re: Haskell for a New Decade [pdf]

#180
post #121

Earlier quoted context omitted.

Nested nullable types collapse to the same type, meaning it's very easy for generic code to contain really subtle bugs. If you have some generic code that has a T? and assumes that whenever it is null it is not T, this assumption will be almost correct and very easy to miss during testing. Also, it's very common to have option-style code and as your code evolves you need to refactor it to either/result-style code (th…

For me, there are two killer reasons for Kotlin to handle nullability as it does: smooth host platform interoperability and zero overhead. The existing huge mass of JVM libraries use null, so by embracing that rather than adding a new wrapper object like Scala's Option (or even JDK 8+'s Optional), Kotlin works smoothly with all those libraries. And with some annotations, Kotlin's nullability support can be applied to…

> The existing huge mass of JVM libraries use null, so by embracing that rather than adding a new wrapper object like Scala's Option (or even JDK 8+'s Optional), Kotlin works smoothly with all those libraries.

Recent JVM libraries have (rightly) moved away from null. Using e.g. JDK8 streams from Kotlin is very cumbersome (noticeably more cumbersome than using them from Scala). The special treatment of interop also creates a bunch of special cases in the language that break your usual assumptions: extracting a common method call won't always work, adding explicit types can change behaviour. It's one of those things that looks like a good idea in the small but creates more problems in the large.

> And with some annotations, Kotlin's nullability support can be applied to those existing libraries.

Again this is a case of Kotlin refusing to learn from history. Look at what happened with the JSR308 checker and adding nullness annotations to existing libraries. Someone adds the annotations and everything seems great, then other people make changes to the library and don't maintain the annotations and they become lies.

> As for zero overhead, an Option or Optional is another object, and the overhead of that object can't be completely optimized away by the JIT.

People who care about zero overhead wouldn't be using Kotlin in the first place. The raison d'etre of the JVM is safer programming with fewer crashes, even if that means a little performance overhead some of the time. (For the record you're wrong: in the cases where the JVM stack-allocates an option or optional the memory pattern is exactly the same as if you'd used a nullable value instead. But that's not the point).

Post reply on HN