3 ms·
The second version would be difficult, maybe impossible currently due to keyword arguments, since: def foo(foobar:Integer) end is already valid, and I
by unfunco 8y ago
The second version would be difficult, maybe impossible currently due to keyword arguments, since:
def foo(foobar:Integer)
end
is already valid, and I think the lexer might struggle with the ambiguity; but I'm not 100% certain.
Edit: I seemingly missed the last line of your comment where you state something similar.
- tsycho 8y agoIf foo:SomeType is problematic, let’s just use foo::SomeType instead. I agree with the parent that inline types are much nicer and more intuitive than he sig based approach.