I don't like the assignments of 'returns' and 'of'.  I think it is easily 
confused.  I've written

foo (Int $x)
returns Int

in examples and nobody noticed.  As formal documentation, that scans right as 
the outer perceived return value type.  But no, it's supposed to be

foo (Int $x)
of Int

instead.  The returns keyword affects the implementation of the function, not 
the external contract.  

Yet, if returns is missing it uses the of value by default, but if the of is 
missing it does not give static type checking to the caller, rather than using 
the same as the returns.

Will other programmers make the same mistake?  I think it's going to be a 
problem.  It's like thinking you used strict but did not, and the compiler 
wasn't telling you things it should have.

--John

Reply via email to