News for hackers. Stuff that matters.
Re:The Four Flaws of Haskell by cies on Monday August 15, 2016 @05:14AM (#12289370)
PureScript is a language that compiles to JS which is heavily inspired by Haskell, yet fixes some of it's "flaws".

Namely it (1) has better record syntax, (2) is employs strict-evaluation instead of lazy-evaluation by default, (3) has a better class hierarchy for "numbers", (4) has a better class hierarchy for control classes[1] (like Monad, Applicative, Functor, etc.). There are more, but to me they are the main improvements.

Compared to Haskell, PureScript fixes some of the "flaws". These flaws are mostly different from the flaws mentioned in the article. Maybe one day PureScript can be compiled to native ...<searching internet>... which is already being worked on[2].

[1] https://github.com/purescript/purescript-prelude/tree/master...

[2] https://github.com/andyarvanitis/purescript-native

Re:The Four Flaws of Haskell by misja111 on Monday August 15, 2016 @05:29AM (#12289410)
Is Haskell's default lazy evaluation really a flaw that needs to be fixed? I personally like it, I find that most of the time lazy evaluation is what I need instead of strict.
Re:The Four Flaws of Haskell by cies on Monday August 15, 2016 @04:59PM (#12293386)
I like Haskell's laziness by default myself. But it turns out that it is hard to reason about for those new to the language, and hard to efficiently cross-compile to a non-lazy language.

Perhaps I should rectify that I do not think laziness is a flaw, yet probably a large hurdle to adoption.

Re:The Four Flaws of Haskell by DanWaterworth on Monday August 15, 2016 @06:59AM (#12289612)
If you'd like strictness by default, there's a pragma for that https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
Re:The Four Flaws of Haskell by taylorfausak on Monday August 15, 2016 @08:28AM (#12289960)
This is another flaw that PureScript fixes: No language pragmas.
Re:The Four Flaws of Haskell by DanWaterworth on Monday August 15, 2016 @09:09AM (#12290147)
I don't think this is a flaw, in fact I think it neatly solves the problem of how to extend the language without committing to a design too eagerly and provides a platform for experimentation.

There are pragmas that GHC implements that are now widely held to be problematic, but we wouldn't know this without an implementation, and using pragmas, we are realistically able to deprecate and remove these extensions.

Re:The Four Flaws of Haskell by taylorfausak on Monday August 15, 2016 @09:29AM (#12290264)
Very few extensions have been deprecated: http://hackage.haskell.org/package/Cabal-1.24.0.0/docs/src/L...

Convenient, widely-used extensions that have been around for a long time aren't yet part of the language standard: https://prime.haskell.org/ticket/67

Re:The Four Flaws of Haskell by DanWaterworth on Monday August 15, 2016 @10:03AM (#12290478)
That's not anywhere near a complete list of deprecated extensions and there are others that have been completely removed from the language [1]. It's unfortunate that ScopedTypeVariables hasn't been standardised, but there hasn't been a new standard since 2010, so it's not hugely surprising.

https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory

Re:The Four Flaws of Haskell by taylorfausak on Monday August 15, 2016 @10:10AM (#12290519)
Thanks for that link! I haven't seen that wiki page before. Even so, only 4 extensions have been removed. I know others are de facto deprecated, like Rank2Types.

I picked scoped type variables as an example because it's been in GHC since version 6.4. That was released in March 2005, so it had plenty of time to make it into the Haskell2010 language standard.

Re:The Four Flaws of Haskell by DanWaterworth on Monday August 15, 2016 @10:33AM (#12290672)
I'd expect either Rank2Types or RankNTypes to be included in Haskell', you may be thinking of ImpredicativeTypes.

Wow, I did not realize ScopedTypeVariables had been around for so long.

Re:The Four Flaws of Haskell by taylorfausak on Monday August 15, 2016 @10:44AM (#12290747)
Sorry, I meant that you pretty much always want RankNTypes instead of Rank2Types. My fault for not specifying.
Re:The Four Flaws of Haskell by tome on Monday August 15, 2016 @09:47AM (#12290372)
Does PureScript have some alternative approach to growing the language? Or is your comment suffixed with an implicit "for now"? :)
Re:The Four Flaws of Haskell by taylorfausak on Monday August 15, 2016 @10:46AM (#12290764)
My impression is that PureScript aims to not be configurable. For example, the compiler does not allow you to disable warnings. Other tools, like `psa`, can do that, but the base language is always the same.

Specifically related to language extensions, there is this wiki page: https://github.com/purescript/purescript/wiki/Differences-fr...

> The PureScript compiler does not support GHC-like language extensions.

Re:The Four Flaws of Haskell by tome on Monday August 15, 2016 @06:14PM (#12293911)
That doesn't stop other people's code being lazy and such laziness not being reflected in the type.
Re:The Four Flaws of Haskell by jjnoakes on Monday August 15, 2016 @07:15AM (#12289662)
PureScript also compiles to readable C++. I haven't used it, but it is compelling.

https://github.com/andyarvanitis/purescript-native