agora icon indicating copy to clipboard operation
agora copied to clipboard

Functions must be declared before use

Open mna opened this issue 10 years ago • 1 comments

Remove this constraint in future versions, especially since it is impossible to use a pair of mutually depended upon functions at the moment.

mna avatar Sep 14 '13 23:09 mna

Maybe: make func statements (i.e. func SomeName() {}) accessible even before declaration, but func expressions (i.e. SomeName := func() {}) accessible only from the point of declaration forward. That's pretty much how it works in Go (well, func expressions cannot be used in top-level, and func statements cannot be used within a func, so the comparison is not accurate).

mna avatar Oct 03 '13 00:10 mna