Now add an absolutely vital library called Milk and watch tea lovers everywhere shudder.
Made correctly, earl grey (really any black tea) needs some milk fat to neutralize the tannic acid or it could turn your stomach.
The Earl Grey programming language
111–120 of 137 posts
Re: The Earl Grey programming language
#112Earlier quoted context omitted.
Is there any other language that does this? For me the second example doesn't look better than the first one.
I haven't seen the feature elsewhere. The second example looks better to me (syntax highlighting helps) and reduces redundancy and indent, but I guess views may vary on this. Good to know!
https://downloads.haskell.org/~ghc/latest/docs/html/users_gu... http://stackoverflow.com/questions/1604270/what-is-the-diffe...
Re: The Earl Grey programming language
#113Earlier quoted context omitted.
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.
In haskell you can write exactly the following: fact 0 = 0 fact 1 = 1 fact n = n * fact (n-1) It works as you would expect and really they aren't that dissimilar.
Re: The Earl Grey programming language
#114EG and Haxe share: - compiles to Javascript - Macros - Pattern Matching - async/await (Haxe requires a 3rd party macro lib, but it integrates well)
EG has: - cleaner syntax - document-building DSL - "One of EG's primary goals is to be as compatible as possible with existing JavaScript libraries and frameworks and the node/iojs ecosystem." (Haxe makes compromises here to support other platforms)
Haxe has: - static type-checking - dead-code elimination - support for more platform targets (PHP, Python, C#, Java and more) - years of experience
Re: The Earl Grey programming language
#115Earlier quoted context omitted.
I'd love to hear why people prefer underscores over hyphens. I think I grew out of syntax fanboy-ism, but C and python __private__, _special_variable are everything but readable to me. They break the visual line too much. Even historically it was a weird symbol, originally a line break that made it into non-space separator in PL/1, then almost everywhere. Before that it was pure formatting, a typewriter glyph to be o…
> I'd love to hear why people prefer underscores over hyphens. Because I like subtraction.
[1] And IMO people shouldn't, basic arithmetic isn't that frequent or complex enough to need such a dedicated treatment. But that's another lisp thing, you care more about having DSL opportunities for anything rather than a fixed set.
Re: The Earl Grey programming language
#116Now add an absolutely vital library called Milk and watch tea lovers everywhere shudder.
Made correctly, earl grey (really any black tea) needs some milk fat to neutralize the tannic acid or it could turn your stomach.
Re: The Earl Grey programming language
#117Re: The Earl Grey programming language
#118Am 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
#119Gives me a good sip of the entirety: the syntax, macros, patmatching, integrating with React, and even how to gulp it and write tests with it. Yet succinct enough to scroll in one swipe.
Re: The Earl Grey programming language
#120Now add an absolutely vital library called Milk and watch tea lovers everywhere shudder.
Made correctly, earl grey (really any black tea) needs some milk fat to neutralize the tannic acid or it could turn your stomach.