leafo/moonscript — Issue #14: method invocation syntax
Author: dvv
Created: 2011-10-11 18:57:57+00:00
State: open

Hi!

Imho, back-slash style of method invocation is not eye pleasant. Back-slashes mean escaping of special characters in most languages.

Wonder if we could allow `instance:method(...)` syntax instead? We have such double meaning for `-`, which when used immediately before a token means negation, otherwise subtraction. Likewise, MoonScript's `instance:method(...)` could compile to Lua's `instance:method(...)`, while `instance: method(...)` could compile like at present, to `{instance = method(...)}`.

What do you think?

TIA,
--Vladimir