ZenScript
ZenScript copied to clipboard
Allow bracketed expressions in ZenType declarations.
This can reduce ambiguity and possibly allow for function arrays, or associatives with function values, if ZenTypeFunctionCallable#toJavaClass
ever gets implemented.
Without the parentheses, stringifying (function()int)[]
would become function()int[]
, though, which is not the same.
Brackets are a common thing to group expressions, so I don't think people will be too confused, though I'll admit it might look ugly.
It might make sense to have ZenTypeFunction
stringify including the parentheses instead, since it's the only type where it makes a difference.