-
Notifications
You must be signed in to change notification settings - Fork 0
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
APPLY discussion #1
Comments
Here's one design improvement also implemented in Key-value
First, it may seem like changing What I wanted is to let words that are not a part of expressions after a set-word, to pass their values:
Or (order doesn't matter):
Same call, but more readable because words that are being assigned a new value and words that are being passed with their current value, are easy to tell apart, and we don't have to repeat ourselves as in the first example. And we still have all the arguments listed explicitly, which eases bookkeeping and reduces the danger of passing an argument by mistake. Format thus can be expressed like this:
|
Another topic worth bringing up is how to denote expressions. In current design, Though simple to understand rule, it can become a gotcha if while reading our code we fail to switch our mental context. Another option is to always require all expressions parenthesized, e.g.:
I do not personally think it's worth it, but it's something that needs consideration by the other team members. |
I don't think we need to go that far. Nested set-words are already accepted for object construction:
|
It would be nice if it could be cheaply aligned with how contexts process set-words, to make calls easier to understand in edge cases. |
Starts here: red/red#4854 (comment)
Red temp implementation is currently here: https://gitlab.com/hiiamboris/red-mezz-warehouse/-/raw/master/new-apply.red
Historical design document: https://github.com/greggirwin/red-hof/blob/master/apply.md
The text was updated successfully, but these errors were encountered: