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
When defining an operator and wanting to access the config this needs to be exposed over args as the define statement, while really nice for defaulting this can lead to a lot of boilerplates.
define operator batch from generic::batch args
count,
time
with
count = args.count,
time = args.time
end;
create operator batch with count = 42, time = 23;
Describe the solution you'd like
We could remove the boilerplate by adding syntactic sugar that follows the rule:
If a define does not have a args or with the statement, it automatically gets it's args populated with the the available options in with.
Risks
Following risks exist:
how to handle it when "not set" for a with element has a meaning, we need to think about it
how do we reach for the defaults in with when creating the sugar-args
does this impact exportability
The text was updated successfully, but these errors were encountered:
Describe the problem you are trying to solve
When defining an operator and wanting to access the config this needs to be exposed over args as the define statement, while really nice for defaulting this can lead to a lot of boilerplates.
Describe the solution you'd like
We could remove the boilerplate by adding syntactic sugar that follows the rule:
If a define does not have a
args
orwith
the statement, it automatically gets it'sargs
populated with the the available options inwith
.Risks
Following risks exist:
with
element has a meaning, we need to think about itwith
when creating the sugar-argsThe text was updated successfully, but these errors were encountered: