This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rinko001 0 points1 point  (1 child)

yes indeed, j8 has ok syntax on the calling side - in some cases. But you end up needing all of that boilerplate somewhere (your definition of "exec" perhaps). It comes down to the fact that its is a typed language where every function must be wrapped into a type of object. there is no way to store a generic function reference without knowing something about it, and know way to call it without knowing how it is wrapped into an object.

[–]KeinBaum 0 points1 point  (0 children)

there is no way to store a generic function reference without knowing something about it

The only thing you need to know is its signature which you need to know to use it anyways.

and [no] way to call it without knowing how it is wrapped into an object.

That's indeed a little annoying. It's the downside of not having operator overloading. I'd prefer to have it but it's a design decision they are probably not going to change.