asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Syntax for first scope block #68

Closed asoffer closed 2 years ago

asoffer commented 2 years ago

Currently every block in a scope must be named, so Icarus ends up with if (...) then {} and while (...) do {}. Ideally we could eliminate the need for then and do.

Doing so would require providing an implicit name for the first block that appears in a scope so that gotos can refer to it.

This needs to be designed as well as implemented, or we need to convince ourselves it's not worthwhile.

Also relevant here would be what happens syntactically if that first block had parameters, as in the current for scope in stdlib/core.ic.

asoffer commented 2 years ago

This is superseded by #81.