Await, pattern matching and macros are great language features Node and CoffeeScript both lack. Nice work!
The Earl Grey programming language
101–110 of 137 posts
Re: The Earl Grey programming language
#102Earlier quoted context omitted.
It's more a question of readability than writeability Something like: result = balance-sheet - ledger-total + discount-total Is harder to read than result = balanceSheet - ledgerTotal + discountTotal
But see, being used to hyphens in variable names, I must tell you I can't figure out which one I find easier to read. On one hand, the presence of hyphens and subtraction is a tad confusing, but on the other, I find "balance-sheet" to be generally nicer to read than "balanceSheet", so it feels like a tie to me. Then, on the other hand, you have things like "xs.for-each(x -> x + 1)" vs "xs.forEach(x -> x + 1)", where…
Me too, and I've wondered if it's because it's activating the same part of my brain that gets aggravated when people decide to use capitals on seemingly random words within the sentence.
Re: The Earl Grey programming language
#103Am I the only one childish enough to ask for the language to be called Earl Grey Hot in honor of Star Trek?
Re: The Earl Grey programming language
#104Earlier quoted context omitted.
Just wondering though, how often do people write subtraction as "stuff-thing" instead of "stuff - thing"? I find myself typing the latter almost systemically, so hyphens never get in my way, but of course it's all too easy to be blind to the habits of others.
If you have `stuff - thing` it’s no big deal, but once you start having `(a0-b0)/(a1-b1) + (x0-y0)/(x1-y1)` or whatever, then being able to save all the spaces starts to be kind of nice, especially if your math expressions get to be 60 characters long. There are a few times where I’ve definitely ended up with more readable code by using the presence or absence of a space as a way to group expressions. Also, I general…
Re: The Earl Grey programming language
#105fact(match) = 0 or 1 -> 1 n -> n * fact(n - 1) why not simply fact(0 or 1) -> 1 fact(n) -> n * fact(n - 1)
I think the first one is a single function that has pattern matching for the parameter while the second one is defining the function twice and relying on the language to call the right one based on the parameter. I think in Erlang the function identification is the name and the arity and this is as close I know of what you would like to have.
Re: The Earl Grey programming language
#106Re: The Earl Grey programming language
#107What level of automated refactoring and IDE integration does it offer?
Re: The Earl Grey programming language
#108I love the name but it will get mixed up a lot on Google searches. Just like it was with the TV series "24" that matched every 24 that was to be found online.
The same as typing '24 tv series' will mostly return relevant results.
Re: The Earl Grey programming language
#109Now add an absolutely vital library called Milk and watch tea lovers everywhere shudder.
Re: The Earl Grey programming language
#110Now add an absolutely vital library called Milk and watch tea lovers everywhere shudder.