Nathan-Wall / proto

A programming language derived from JavaScript which emphasizes prototypes, integrity, and syntax.
Other
12 stars 1 forks source link

Implicit infinite range prefix and postfix operator? #98

Open Nathan-Wall opened 10 years ago

Nathan-Wall commented 10 years ago

It could be helpful to have implicit inf when the range operator appears without an explicit operand.

gen ids() {
    for i of 1.. :
        yield i;
}
var subArray = array[3..];

Would the grammar work out ok?