Language Limitations
From dis-Emi-A
Unique name meaning in scenario
Any name used within a scenario may only have a single definition within that scenario. This in particular means that two distinct scenarios of the same function name cannot be used within a single function body. By example the below cannot work:
nothing :> ( a -> b )
{
b = a;
};
add :> ( -> )
{
:Float: q = nothing( 1 );
:Integer: m = nothing( 1 );
};
This does not work since "nothing" would need to have two distinct signatures in the same scenario in order to work.
This is not seen as a major limitation, as such a situation is uncommon, and if indeed it is needed one can simply introduce a wrapper function (with a new name and same signature) with a different name, which bypasses this limitation then.
FIX THIS: This limitation cannot be maintained since it also means simple operators like addition are also subject to such a limitation, and the common use of such functions would make this very prohibiting.
What this probably means is that first-order function names are allowed to have multiple definitions, but assigned names are not. That is the above code should work, but the below code not:
add :> ( -> )
{
func = nothing;
:Float: q = func( 1 );
:Integer: m = func( 1 );
};
Getting the first code to work is straight forward, as function names can be bound specially, getting the second form to work would make up-typing very difficult (in particular if a bind variable is returned from a function).
