ZenScript icon indicating copy to clipboard operation
ZenScript copied to clipboard

Allow bracketed expressions in ZenType declarations.

Open eutro opened this issue 4 years ago • 2 comments

This can reduce ambiguity and possibly allow for function arrays, or associatives with function values, if ZenTypeFunctionCallable#toJavaClass ever gets implemented.

eutro avatar Oct 23 '20 11:10 eutro

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.

eutro avatar Oct 28 '20 10:10 eutro

It might make sense to have ZenTypeFunction stringify including the parentheses instead, since it's the only type where it makes a difference.

eutro avatar Oct 28 '20 10:10 eutro