Live data from Hacker News

The Joy and Agony of Haskell in Production

stephendiehl.com

91–94 of 94 posts

Re: The Joy and Agony of Haskell in Production

#91
post #78
post #66

Earlier quoted context omitted.

There seem to be a hundred language definitions of Functor. Even Haskell's doesn't exactly correspond to the mathematical understanding of the term (if it did, Set would be a functor) C++ is the worst offender, though.

How is Set a functor in a mathmatical sense?

You can define a function setMap such that if you setMap any function f from a -> b where Set a and Set b are valid types, then setMap f lifts f to a function Set a -> Set b. setMap will also satisfy the functor laws (or law, if you understand the parametricity derivation of the second law, which I don't :) ). Or in other words, setMap id = id.

In fact, the mapping is absolutely obvious. Haskell slightly brain damages us by assuming that setMap would have to apply to all a->b functions, which can't be done because a and b need to be Ord.

Although apparently it _can_ be done in GHC 8. ish.

https://gist.github.com/ekmett/f783ea6af2e041b7b887

Re: The Joy and Agony of Haskell in Production

#92
post #79
post #73

Earlier quoted context omitted.

Any top apps? I don't think you can beat other languages yet, except in some very niche areas. There's not even incremental compilation! Hell, even python can infer function types these days! Rust has been around much longer than Swift for example, and yet there are many very more production Swift apps. Whereas rust seems limited to play stuff. Of course, given another 2-5 years it should catch up in many ways. Compa…

Swift reached 1.0 a full year before Rust did. Just because Rust was developed in the open and Swift wasn't doesn't mean that Rust has been usable longer than Swift. :P

That said, Rust 1.0 was way more usable than Swift 1.0

Just because something says 1.0 doesn't mean it's usable :P

Re: The Joy and Agony of Haskell in Production

#93

Earlier quoted context omitted.

Dropbox has Rust at the core of their product now. We have a fair amount of production use.

Aren't they sold to Go? https://twitter.com/jamwt/status/629727590782099456 https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-...

The same person behind that linked tweet has openly remarked about Dropbox's Rust usage, see for example here: https://www.reddit.com/r/programming/comments/3w8dgn/announc...

Re: The Joy and Agony of Haskell in Production

#94
post #82

Earlier quoted context omitted.

> Computing with units (which is tough to put in a language, but so is compilation F#'s units are nice. > Computing with dates in a sensible way The new Java time API is pretty good. But honestly my favourite datetime API would have to be Postgres'. > BigDecimal for currency, let me laugh Out of curiosity, why?

For F#, I didn't know. It looks verrrrrry sweet. For BigDecimal, my grief is that it makes code horrible (at least in my experience, I'm still locked in JDK 1.7). BigDecimal has the problem I see with the rest of my griefs : it is possible to compute things correctly with code (obviously), but the way the code is written is ugly (and painful). BigDecimal yearly_amount = new BigDecimal("1000.00"); BigDecimal daily_amo…

True, but it can do, if you set precision etc.
Post reply on HN