The really cool thing is that if you have an if-else chain, which is the new way of doing multiway if, it will detect which number branch the error occurred. The Hint at the bottom is also slightly different; it say "all branches of an `if`" need to match, not just "these".What makes this an pleasant surprise is that if-else chains are not a special case of syntax -- they work just fine in 0.15 -- but the error handling treats them as a single multiway if rather than several nested uses of a binary if.
--
You received this message because you are subscribed to the Google Groups "elm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/78a7f0b1-42fe-4957-852f-c9b6e83b7ba6%40googlegroups.com.
I find “Pair programming with the combined wisdom of 40 years of the best programmers.” slightly over the top. :)
Hacker News might pull you to pieces over that. (Who are those best programmers you are talking about? Are you entitled to make a judgment about who were the best programmers of the last 40 years?)
Also, while the error and warnings stuff is cool, is it really that much ahead of other languages? GHC can warn you about missing and redundant patterns. Lennart Augustsson gave a cool talk last year about using provenance tracking for giving good “expected vs. actual” errors for his in-house Haskell dialect (and applicable to GHC). I know that Haskell/GHC error messages lack in other regards, and that you can claim better quality for Elm error messages. But in the details, emphasizing “we can do expected vs. actual”, or “the compiler now tells us about stuff we did wrong in pattern matching”, you might simply get responses like “So what, Haskell compilers can do this and do do this”. So being overzealous on this could backfire, is all I’m saying.
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/CAF7GuPHT7GUn40CdqPjFLqav4Cx77VD8283yLWDDfzPrungB4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/CAGkFuyB4myK-O7yW-xe%2BKF6DfCA-pL4F5fw4DO_RiweGE6i0ww%40mail.gmail.com.
Yes, but of folks who read HN, how many of them are Haskell programmers?
I have no idea, actually. Maybe not so few?
And of all Haskell programmers, how many would say that the Haskell errors are easier to work with?
Well, they might say that Elm is solving an easier problem on that front, because the Haskell type system is more expressive in many ways.
But anyway, I agree with the general spirit you express in your elaboration of this idea. (About bringing this new experience to JS mainstream developers etc.)
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/CAF7GuPEBhGJUveMOJudF%3DmChN%3Dx02SVeJPdZu4aQV90zuYCzLQ%40mail.gmail.com.
And of all Haskell programmers, how many would say that the Haskell errors are easier to work with?
Well, they might say that Elm is solving an easier problem on that front, because the Haskell type system is more expressive in many ways.