haxetink / tink_core

Core utilities
https://haxetink.github.io/tink_core
MIT License
117 stars 33 forks source link

Do not wrap functions inside anonymous function for JS in Callback.fromNiladic #95

Closed Neverbirth closed 6 years ago

Neverbirth commented 6 years ago

This seems to avoid getting anonymous functions in coconut.ui without any side effect. Some double check would be welcome. Maybe @kevinresol can comment on it.

back2dos commented 6 years ago

I think this is fine. The only situation that I can think of where this might be problematic is if the callback is passed to some JS code that explicitly checks Function::length, but that seems an extremely unlikely case in which people can still use T->Void instead.