Live data from Hacker News

The Earl Grey programming language

breuleux.github.io

31–40 of 137 posts

Re: The Earl Grey programming language

#32
post #7

"Oh god, do we need another language that compiles to javascript?!" —Everyone, probably

JS is the new JVM. Write once, run anywhere is still the dream, I'm glad new programming languages are taking advantage of JavaScript's versatility.

> Write once, run anywhere is still the dream

More like "write once, run in the browser". I don't think most compile-to-js languages care too much about "anywhere", they are just trying to get nicer alternatives in what is basically a platform (the browser) closed to anything except JS.

Re: The Earl Grey programming language

#33
post #32

Earlier quoted context omitted.

JS is the new JVM. Write once, run anywhere is still the dream, I'm glad new programming languages are taking advantage of JavaScript's versatility.

> Write once, run anywhere is still the dream More like "write once, run in the browser". I don't think most compile-to-js languages care too much about "anywhere", they are just trying to get nicer alternatives in what is basically a platform (the browser) closed to anything except JS.

The examples in the article seem much more focused on NodeJS.

Re: The Earl Grey programming language

#34
post #17

Earlier quoted context omitted.

I think a lot of lisps use hyphens in variable names

There's plenty of precedent. It's just rare for a reason. I'm not sure allowing slightly easier access to CSS syntax justifies it.

I guess it depends a lot on your coding style. When I started allowing hyphens in variable names, I already had about 10,000 LOC of Earl Grey, including the whole compiler for it (seriously, it was a pretty late addition). In all that code, I only had to change one or two lines if I allowed hyphens, so I decided to just go ahead and do it.

And not even because of CSS, just because I think "do-thing" looks better than both "doThing" and "do_thing". Of course, I would think differently if I tended to write "a-b" instead of "a - b", but at the moment I quite enjoy this feature.

Re: The Earl Grey programming language

#37

Does 'each' serve as both forEach and map? It appears that way from the fib example.

Yes. The compiler detects whether the return value is used or not to determine whether to accumulate the results in an array or not. Also, unlike forEach and map you can use continue or break.

Re: The Earl Grey programming language

#38
post #7

"Oh god, do we need another language that compiles to javascript?!" —Everyone, probably

I think it's unfortunate that this is currently the top comment on this post. Someone puts hundreds of commits of work into a nifty language with a nice feature set (including compile-to-js) and awesome integrations, and this is what they get on HN...

I think this looks like a great project, we can never have too many programming languages to play around with.

Re: The Earl Grey programming language

#40
post #17

Earlier quoted context omitted.

I think a lot of lisps use hyphens in variable names

There's plenty of precedent. It's just rare for a reason. I'm not sure allowing slightly easier access to CSS syntax justifies it.

Out of curiosity, what's that reason?
Post reply on HN