I have more of an open question that explicit one.
In thinking about function declaration, I'm wondering how accurate is the
following model:
<func | proc | method | iterator | converter> `<identifier>` [*]?
[ [ static[U]: StaticType = default_value, T: GenericType = default_type,
...] ]
( a : TypeDesc = default_type; [ var ]? b : GenericType = default_value, [
var ]? a : ConcreteType= default_value)
{. pragmas .} : [ var | const ]? <return_type> = ...body...
Run
Are StaticType and ConcreteType ( e.g. int ) actually the same?
Do all types (TypeDesc, GenericType, ConcreteType) take type-classes?
type
EgConcreteType = int32 | int64
EgGenericType = int32 | int64
EgTypeDesc = typedesc[int32 | int64 ]
Run
Is it possible (or even desirable / make sense) to return a TypeDesc from a
function?
Would it make sense for StaticType to take a typedesc, instead of a value? Or
is that what GenericType is for?
I feel like there is a simplification here somewhere that I'm not seeing