Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the point of changes like [] to List, mod to %, . to << and >>? Is it just aesthetics?

When I looked at Elm it was really similar to Haskell. After I learned a bit of Elm I dove into Haskell. Now that I'm coming back to Elm I'm having problems because I confuse this different syntaxes many times.

I hoped they could maintain the language more similar to it to make the switch between them easier.



Personally, I am overjoyed that Elm is taking steps to make it's aesthetics more approachable to the non-Haskell crowd. Haskell is wonderful, but it has a learning curve that is steep enough to ward off the vast majority of programmers. A big part of the curve is that Haskell has a vocabulary that presumes a familiarity with decades of research that frankly only a very small population is familiar with. In that context, I'm sure "lift" made sense for the Elm thesis. But, without that context, "map" makes a lot more sense to me and to a lot more people.

I'm hopeful that Elm will help bring Haskell's ideas to a wider audience. After those ideas become familiar, I fully expect a large crowd of them to find Haskell's highly efficient syntax for expressing them to be very enticing. But, getting people to that point is going to require a lot of considerations to ease the JavaScripter -> Elmer -> Haskeller transformation.


Yes, Elm is a gateway drug to Haskell.


I expect that at some point, someone will write a Elm -> Haskell thing (like Elixir -> Erlang).


I'm pretty sure I read about someone writing this at some point, but I couldn't find it.


I personally find all the changes really nice. (<|), (|>), (<<), (>>), are far more intuitive compared to the Haskell operators for example. Yes, it's just syntax, but usability is important. As an aside, Idris uses (:) in type signatures, and doesn't have a lift function in its standard library (it just leans on a genereralised map function).


The only reason why Haskell uses (::) is because they wanted to preserve (:) for lists, thinking that list operations would be more prevalent than type operations. That ended up being a poor bet, as it turns out.

(:) is very standard notation for "has type" in type theory.

Also, all of the mapN functions exist in Haskell and Idris as applications of the Applicative typeclass.


Yes, aesthetics. Here is another one:

: and :: are reversed.

They have no intention of making them more similar- in fact I was told there is going to be more subtle diverging happening.

Elm was really cool for me too at first, but these subtleties are just a pain. I am now using haste (haste-lang.org), which seems to have really come a long way over the course of its 3 year life span. I highly recommend it to those wanting to use Haskell as a front-end web development language.


Wow, haste is great. Thank you for sharing.


Completely agree. Not only these subtle changes but also the Evan's resistance to include common typeclasses and generally anti-intellectual attitude and rudeness have turned me off completely. Evan also plays favorites a lot and has a rather naive view of social justice (which he views himself as some kind of champion for).

Purescript has now become my alternative but I will take a look at Haste (ghcjs may be another possibility to look into).


Concerning [], many people regret that there is a special syntax for it in haskell




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: