def foo : number (){ return "not a number"; }
The ability to do this is not so nice. This would probably need to emit a runtime warning. Alternatively, one could do a compile time check, but that would require an AST traversal for the type check.
Return type syntax is useful for FFI calls, but for user defined functions it could cause confusing situations without it having any semantics...
def foo : number (){ return "not a number"; }The ability to do this is not so nice. This would probably need to emit a runtime warning. Alternatively, one could do a compile time check, but that would require an AST traversal for the type check.
Return type syntax is useful for FFI calls, but for user defined functions it could cause confusing situations without it having any semantics...