News for hackers. Stuff that matters.
Re:Haskell: A Great Procedural Language by astrange on Sunday January 19, 2025 @01:01PM (#42759558)
> Co-Star, the astrology SaaS, is apparently written with a Haskell backend. I'd love to have seen the casting call for that.

They have a page about it: https://www.costarastrology.com/why-haskell/

It does one of the things I find most annoying about Haskell programmers, which is that they think the language is magic just because it has ADTs.

> HASKELL MAKES ILLEGAL STATES UNREPRESENTABLE.

That's not true!

It's especially not true for numeric programming, Haskell really doesn't provide good support for that. Basically only Ada and dependent-type languages do.

Re:Haskell: A Great Procedural Language by tome on Sunday January 19, 2025 @03:23PM (#42761402)
It is most definitely true for numeric programming (and Haskell is _somewhat_ dependently typed). For example, look at this finite bit width concatenation operation:

https://hackage.haskell.org/package/clash-prelude-1.8.2/docs...

How it compares to Ada though, I could not say.

Re:Haskell: A Great Procedural Language by astrange on Sunday January 19, 2025 @04:08PM (#42761843)
By "support" I don't mean that you can do it. Rather I meant the opposite - it doesn't stop you from doing it incorrectly.
Re:Haskell: A Great Procedural Language by tome on Monday January 20, 2025 @03:05AM (#42766123)
I see. You're probably correct about that. I guess I got thrown off by your suggestion that dependently typed provide good support for numeric programming, because I doubt any dependently typed language that put a lot of thought into floating point modes (and I'm not aware any has particularly good suppose for ranged integer types either, but I could just be uneducated in that regard).