On Saturday, 19 March 2016 at 08:38:20 UTC, Basile B. wrote:

Otherwise there's something that's pretty in the syntax:

Very much so. My own "toy language" project uses (well, _will_ use once I have more than 5% of a parser) a similar syntax, so it could just be my own biases talking, but I like it.


However later in the function declaration:

"sum := (x: float, y: float, z: float) -> float {
    return x + y + z;
};"

I would expect the same system as for variables:

"sum : float = (x: float, y: float, z: float) {
    return x + y + z;
};"

or return type inference:

"sum := (x: float, y: float, z: float) {
    return x + y + z;
};"

As far as the second example goes, sum is a function returning float, not a float variable. I could be wrong, but it appears to me that using variable-like syntax would make the grammar (or at least its semantics) less context-free. Plus the () -> type {} syntax works nicely for lambdas. I'm sure the type-inference option could be supported, though.

The language has some very interesting ideas. I probably wouldn't use it for general-purpose programming, though. I like my OOP, at least when it fits the problem at hand.


Reply via email to