-
Notifications
You must be signed in to change notification settings - Fork 48
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
[Feature request] Add . (dot) or other symbol(s) as variable reference in assignment block #180
Comments
I've considered this feature, but been dismissing it due to:
|
So, what if strict assignment with reference only to ordinary variables (e.g. |
Yup, we'd have to disallow it on destructuring LHS.
Right. |
Whipped up a trial impl there. Some notes:
|
Merged as is. |
Currently we have this sugar:
some.long.long.long.variable .= to-upper-case!
But we often have a lot of functions from some libs that takes var as argument and returns new value.
I suggest to add
.
(dot) as variable reference in the assignment block:And we can use
some.long.long.long.variable = . .to-upper-case!
Maybe instead of dot use
&.
or$&
(like in regex)I think this will be very usable.
The text was updated successfully, but these errors were encountered: