lento-lang/Lento-CSharp

Remove function declaration style ambiguities

WilliamRagstad opened this issue · 0 comments

So we need to determine a standard way for function vs variable declarations.
Easiest is to enfoce parenthesis around the parameter vector after the function name in declarations.

f(float x, int m) = 2*x + m #inferred return type
PI = 3.1415 # inferred value type

This makes it easy to differentiate between a variable and a parameterless function.
Both variable and function declarations can thereforce ommit return/value types and let those be inferred.

double f(float x, int m) = 2*x + m
Real PI = 3.1415