You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImportFunction currently takes a list of param types and a list of return types.
However, there exist a FunctionType object that represents exactly these lists; it would be natural for ImportFunction to reuse this object internally; then expose a .functionType() member
It might probably still make sense for HostFunction (at least) to expose an overloaded constructor:
Related, why do we have both HostFunction and ImportFunction? It seems that we could replace all usages of HostFunction with ImportFunction and remove it.
the initial idea was that the user-facing API could be unrelated to the internal API, and possibly that the naming is clearer.
The original problem was that everything was called a Host* something even when something did not originated from the host; indeed ImportFunction is less confusing, but on the other hand is less intentional (our end users will always define host functions). It also pairs well with the @HostModule concept.
I am not strongly against the idea of dropping it, if we think it's clear enough. Maybe we can take a look at the naming in other runtimes.
ImportFunction currently takes a list of param types and a list of return types.
However, there exist a FunctionType object that represents exactly these lists; it would be natural for
ImportFunction
to reuse this object internally; then expose a.functionType()
memberIt might probably still make sense for HostFunction (at least) to expose an overloaded constructor:
to reduce typing for explicit construction; otherwise it will always look like:
The text was updated successfully, but these errors were encountered: