Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add \ overload handling calling a Nil def #111

Open
2 tasks
Tracked by #108
kurtlawrence opened this issue Jul 5, 2022 · 0 comments
Open
2 tasks
Tracked by #108

Add \ overload handling calling a Nil def #111

kurtlawrence opened this issue Jul 5, 2022 · 0 comments
Labels
breaking-change Likely to break existing code bases enhancement New feature or request maybe Still in brainstorm phase, may not eventuate

Comments

@kurtlawrence
Copy link
Member

kurtlawrence commented Jul 5, 2022

This syntax would be useful for patterns such as append \+ $i.foo $i.bar.
That is, where the + is usually typed and will not work on an input such as TableRow.
Typically, the pattern is append { let {get bar} $b | get foo | + $b }.

Generalising this is tricky.

Implementation option

The \<cmd> arg1 arg2 ... argN is sugar for an intrinsic, which will amount to let $i | \#n | <cmd> arg1 arg2 ... argN.
This benefits from having <cmd> be whatever is already defined, along with doing the let $i portion.
The drawback is cmds (such as +) would now need a Nil input, which is going to place further burden on the inferencer.

@kurtlawrence kurtlawrence added enhancement New feature or request breaking-change Likely to break existing code bases maybe Still in brainstorm phase, may not eventuate labels Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Likely to break existing code bases enhancement New feature or request maybe Still in brainstorm phase, may not eventuate
Projects
None yet
Development

No branches or pull requests

1 participant