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
There seem to be at least the following possibilities for creating things that can be instantiated at compile time, or called at run time, where multiple possible "targets" with the same name but different parameter signatures exist and should somehow be selected between.
Compile-time:
instantiation of extern object, parser, or control with constructor parameters
instantiation package with parameters
Run-time:
call of action, function, control.apply(), or parser.apply() with parameters
Questions:
Should distinguishing between targets be done by arity (i.e. number of parameters) only, or also by types of parameters? If by types, what should the compiler's mechanism be for deciding which target is the right one?
For targets that support optional parameters, even arity might not be enough to unambiguously select a target. I have heard that as of 2019-Jul-08, the latest p4c requires distinguishing targets by using "parameter_name = value" at the call site.
One possible response is that this is all a p4c compiler implementation issue, and should not affect the contents of the spec. Even if it should affect the spec, it would make sense if an implementation was done before specifying it, in hopes of keeping spec proposals implementable.
There seem to be at least the following possibilities for creating things that can be instantiated at compile time, or called at run time, where multiple possible "targets" with the same name but different parameter signatures exist and should somehow be selected between.
Compile-time:
Run-time:
Questions:
One possible response is that this is all a p4c compiler implementation issue, and should not affect the contents of the spec. Even if it should affect the spec, it would make sense if an implementation was done before specifying it, in hopes of keeping spec proposals implementable.
Related issues (likely incomplete):
The text was updated successfully, but these errors were encountered: