NEP3 Abbreviated Functions - ghewgill/neon-lang GitHub Wiki

Often is it necessary to write a function that only returns a (computed) value. This is currently written as follows:

FUNCTION foo(x: Number): Number
    RETURN x * x
END FUNCTION

This proposal extends the FUNCTION definition to allow writing the following:

FUNCTION foo(x: Number): Number := x * x

The addition of the := symbol eliminates both the RETURN and END FUNCTION keywords.