Hacker News new | ask | show | jobs
by vmchale 2757 days ago
Is this a research language? I don't understand how this offers anything beyond what already exists.

I'm also suspicious of the fact that it's implemented in Go. I would think that someone who knew functional programming well enough to create a new language would implement the language in Haskell or OCaml or even Standard ML.

Also the type system looks pretty bad. No algebraic data types.

3 comments

What a bizarre criticism. Most of the newer popular functional languages aren't implemented in those, but rather Java, and for the same reason given in the readme for Go.
> Most of the newer popular functional languages aren't implemented in those, but rather Java

Well, that's not entirely correct. I assume you mean they run on the JVM? Language like scala are actually written IN scala. The only thing that is in java is the interpreter but the entire compiler is scala.

True enough for Scala, but Clojure has plenty of Java code.
OTOH clojure script is completely written in clojurescript
> Most of the newer popular functional languages aren't implemented in those, but rather Java,

I don't think this is true. Java is not a good language for compilers in any case, and it would cause me to trust the language less, especially if they were claiming it was a "functional programming language"

> Java is not a good language for compilers

Could you elaborate?

> would implement the language in {foo}

If that choice becomes perceivable to anyone but the authors and maintainers of the language itself, I'd say that's a first class failing, isn't it?

The quality of a language should be a pure function of the language itself; the interpreter doesn't (or rather, shouldn't) enter into it.

I think the GP has the following causal diagram in mind:

               +---------------------+
               | Author's competence |
               +-------+-----+-------+
                       |     |
                       |     |
    +--------------+   |     |   +---------+
    |Implementation| <-+     +-> |Product  |
    |  language    |             |language |
    +--------------+             +----+----+
                                      |
                                 +----v----+
                                 |Language |
                                 |quality  |
                                 +---------+

So you are both right; language quality is a function of the language itself, but if we don't yet know much about the language or its author, there is a correlation ("confounding") between language quality and the choice of the implementation language, so if that's the only information we have, might as well take advantage of it.

I am not weighing in here on what specifically the choice of Haskell, OCaml, or Go say about author's competence; I am simply addressing your point that the choice shouldn't matter at all—unless you are convinced that the knowledge of PL theory and design principles is uniformly distributed across all language communities.

Except that Haskell and OCaml as implementation languages would signal huge academic bias and therefore likely inability to come up with a usable language or at least there exists a negative correlation with those languages.
> Haskell and OCaml as implementation languages would signal huge academic bias

Apparently reading papers from the past 30 years is a "huge academic bias."

I'd honestly be fine if it was implemented in Racket too.

> inability to come up with a usable language or at least there exists a negative correlation with those languages.

No one has ever actually offered me a substantive argument that Haskell is unusable. It always seems to be "well, I don't personally understand it, and that means it's unusable" Uhh okay.

Just as a sidenote, Rust's compiler was first implemented in OCaml after all, is Rust "academic and unusable"? ;)
I don't agree with "unusable" but "academic" probably has some justification.

The fact that it has a "let" keyword does make it "academic" to me. I'm fairly sure we can now have compilers that don't need such hints to be explicitly provided. Rust enjoys its let keyword so much they have a "If let" syntax.

Languages that use random punctuation without providing real benefit could also use a cleanup. Lua with ~= is a good example: Tilde in mathematics means "approximate". In C != means "not equal". So lua's designers can be accused of either never seeing C or deliberately choosing something different. Given that Lua is implemented in C they can't easily claim ignorance.

Archaic and awkward ways of expressing code shouldn't be propagated into new languages unless here is a clear benefit. Have a look at Erlang. Excellent overall but has lots of old warts from yesteryear you wouldn't want in a modern language. Eg look at its string syntax / naming rules. Now compare it to Elixir. Modern. Same VM.

Moving with the times is useful. Future languages shouldn't be adding debris everywhere just to be different.

“let” us a required feature of the Rust grammar; the semantics would be significantly more complex without it, making tooling harder, etc. we didn’t add it for no reason.
More than more languages, yes.
That worldview on OCaml and Haskell = academia only is pretty out-of-date these days...
What does GP stand for? I keep seeing it around HN. I'm assuming it's a variation of OP?
I'm mostly just saying "if the authors were experts on functional programming, surely they would use Haskell or OCaml?" My problem is not with the compiler/implementation but rather the fact that they are trying to sell a new functional language without having taken stock of the existing offerings.
they are trying to build on top of the go runtime, so implementing it in go makes sense.