Live data from Hacker News

Elm: a functional reactive programming language that compiles to JavaScript

elm-lang.org

41–50 of 51 posts

Re: Elm: a functional reactive programming language that compiles to JavaScript

#41
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

You realize that this is nothing like CoffeeScript, except in compiling to JavaScript? The point of CoffeeScript is to iron out the kinks in JavaScript--it's basically JavaScript polished up in slightly different clothes.

This language, on the other hand, is completely different from JavaScript. Writing functional, reactive code is entirely dissimilar from writing idiomatic JavaScript. This isn't an attempt to make JavaScript easier to write--it's an attempt to bring an entirely different paradigm to the web.

Not only is the language completely different from JavaScript, but it also brings a new way of interacting with the DOM. Reactive programming can be used to model interfaces very neatly; it is probably a better way to interact with a web page than the DOM.

I suspect people used to OOP languages will (at least at first) find this one harder to use that JavaScript. On the other hand, the sort of people who are already using Haskell and the like will enjoy it. Also, a functional language like this tends to have more concise code and fewer opportunities for error--mutation is at the heart of a large number of bugs; limiting it removes most of these bugs.

Finally, just because JavaScript is already easy doesn't mean it couldn't be improved. In my experience, I tend to solve problems faster in Haskell than JavaScript; bringing that sort of programming to the web could make me a more productive web developer.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#42
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

CoffeeScript is essentially JavaScript with a different syntax, while this is a completely different language that just happens to have JavaScript as it's primary build target (which makes a lot of sense if you think about Functional Reactive Programming).

I fear you may be missing the point.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#43

Earlier quoted context omitted.

What specifically is your thesis? (I'm well-versed with the various formulations of FRP that have existed over the years.) P.S. the navigation links at the top of the page don't work in Opera. Why aren't they just links + :hover CSS? (I presume they're written using Elm but that's not good if people for whom Elm doesn't work want to find out more.)

That's a much tougher question. I am still early in the process, so I don't have a clean and clear answer yet. I am trying to approach FRP from the perspective of GUI design. In this context continuous Behaviors and discrete Events are not exactly what a developer would want to deal with. I don't want to go into it too much now, but I will definitely post my thesis once it is done. Also, thanks for pointing out the O…

I wrote a GUI system using FRP in OCaml. I found events + behaviors (and their Cartesian product) to work very well (with the notable exception that syntactic sugar for defining state machines would be a desirable addition), so I'm very curious to see what improvements you suggest.

By "post my thesis" presumably you mean on your website and not HN? (I'll never find it if it's just on HN.)

Who's your thesis advisor?

Re: Elm: a functional reactive programming language that compiles to JavaScript

#44
post #41
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

You realize that this is nothing like CoffeeScript, except in compiling to JavaScript? The point of CoffeeScript is to iron out the kinks in JavaScript--it's basically JavaScript polished up in slightly different clothes. This language, on the other hand, is completely different from JavaScript. Writing functional, reactive code is entirely dissimilar from writing idiomatic JavaScript. This isn't an attempt to make J…

mutation is at the heart of a large number of bugs

You mean like this? http://fallout.wikia.com/wiki/Giant_ant_(Fallout_3)

Re: Elm: a functional reactive programming language that compiles to JavaScript

#45
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name.

Doesn't matter. Elm is a unique name for a programming language. That something completely different exists with the same name doesn't make any difference to either project.

Besides, if Google can name a language Go, even though a programming language was already named Go!, then naming a programming language Elm, even though an email client is already called Elm, isn't nearly as confusing.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#46
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. Doesn't matter. Elm is a unique name for a programming language . That something completely different exists with the same name doesn't make any difference to either project. Besides, if Google can name a language Go, even though a programming language was already named Go!, then naming a programming langua…

Google naming a language Go was also a terrible idea.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#47

Earlier quoted context omitted.

That's a much tougher question. I am still early in the process, so I don't have a clean and clear answer yet. I am trying to approach FRP from the perspective of GUI design. In this context continuous Behaviors and discrete Events are not exactly what a developer would want to deal with. I don't want to go into it too much now, but I will definitely post my thesis once it is done. Also, thanks for pointing out the O…

I wrote a GUI system using FRP in OCaml. I found events + behaviors (and their Cartesian product) to work very well (with the notable exception that syntactic sugar for defining state machines would be a desirable addition), so I'm very curious to see what improvements you suggest. By "post my thesis" presumably you mean on your website and not HN? (I'll never find it if it's just on HN.) Who's your thesis advisor?

What was your project called? I remember reading a paper on an ML implementation of FRP (Reactive ML?); I'm curious if that was you. Also, yes, on my website.

I'm working with Stephen Chong. This isn't his primary research focus, but he is a really great adviser. Our PL group is really strong (I think :P), so I have lots of great resources around.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#48
post #41
post #38

1 - You shouldn't re-use a name that already exists. Elm is a long existing mail client. Pick a different name. 2 - Is writing JavaScript really that hard to people that we need so many of these CoffeeScript like languages? JavaScript is really damn easy to write as is. The biggest pain is the DOM and there are various libraries to deal with that if you want.

You realize that this is nothing like CoffeeScript, except in compiling to JavaScript? The point of CoffeeScript is to iron out the kinks in JavaScript--it's basically JavaScript polished up in slightly different clothes. This language, on the other hand, is completely different from JavaScript. Writing functional, reactive code is entirely dissimilar from writing idiomatic JavaScript. This isn't an attempt to make J…

I couldn't have said it better myself. Thanks for backing me up :)

Re: Elm: a functional reactive programming language that compiles to JavaScript

#49
post #35

another coffeescript-like language. How many do we need?

an earlier comment pointed out that there is no similarity between elm and coffeescript except that they compile to JavaScript. coffeescript is just JavaScript in a new syntax. Elm brings a new paradigm to the web.

Re: Elm: a functional reactive programming language that compiles to JavaScript

#50
post #8

The original paper that introduced Functional Reactive Programming was the Fran paper: http://www.usenix.org/publications/library/proceedings/dsl97...

For an even earlier FRP paper, see http://conal.net/papers/ActiveVRML/, about the first implementation of what came to be called "FRP". Fran was my reimplementation of that system after I found Haskell.
Post reply on HN