budgielang/GLS-Legacy

Java doesn't seem to support Func<T1, T2, ... TResult> style usage

Opened this issue · 1 comments

It looks like there's no way to support arbitrary numbers of parameters. C#'s built-in Func supports up to 16, but that's because it's a hardcoded interface 16 times.

For now, it's necessary to force GLS users to declare delegates (C#) / interfaces (Java,TypeScript) in order to pass lambdas around. This is moderately acceptable since it forces more accurate type checking on functions passed around... but it would be nice to have the option to not.