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
The exec method on a declarative hook is special in that when it exists, the return of the hook is public data from parsing it. This is how we can make dcl hooks into functions with typed inputs. For example:
Currently, when processing this method, we run a macro such that the field exec is transformed to exec<- which is a public method. If an exec method exists, then only the public data from the exec execution is returned as is shown in the above example (ie {'stuff': 'things'}).
This proposal opens up the idea of what various exec methods behave when called bare (exec), publicly (exec<-), and privately (exec<_). It is centered around the notion of what happens to the fields in the hook in response to various exec methods.
Proposal
There are three general options which are possible with the following outcomes.
Bare exec -> Returns on the public data
Public method exec<- -> Returns the fields along with the public data
Private method exec<_ -> Returns only the fields and none of the exec method
Public hook call exec-> -> Call as if it is a hook
Private hook call exec_> -> Call as if it is a hook with --no_output
Private + Bare
exec
Method (ieexec<_
/exec
)None
Proposal Status: wip
Issue Number: 248
Proposal Doc: exec-method-arrows.md
Overview
The
exec
method on a declarative hook is special in that when it exists, the return of the hook is public data from parsing it. This is how we can make dcl hooks into functions with typed inputs. For example:Currently, when processing this method, we run a macro such that the field
exec
is transformed toexec<-
which is a public method. If anexec
method exists, then only the public data from theexec
execution is returned as is shown in the above example (ie {'stuff': 'things'}).This proposal opens up the idea of what various
exec
methods behave when called bare (exec
), publicly (exec<-
), and privately (exec<_
). It is centered around the notion of what happens to the fields in the hook in response to variousexec
methods.Proposal
There are three general options which are possible with the following outcomes.
Bare
exec
-> Returns on the public dataPublic method
exec<-
-> Returns the fields along with the public dataPrivate method
exec<_
-> Returns only the fields and none of the exec methodPublic hook call
exec->
-> Call as if it is a hookPrivate hook call
exec_>
-> Call as if it is a hook with --no_outputValues of different types can be used as well.
Dict bare + methods -> walk
Dict hook call -> block
String bare + methods ->
Examples
Bare
Only the
exec
method's public data.Public
Both the
exec
method's public data and the fields.Private
Only the field's data.
The text was updated successfully, but these errors were encountered: