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
All is in the title. Currently this syntax is not understood:
julia> (head, tail...) = (1,2,3,4,)
ERROR:syntax: invalid assignment location "b..." around REPL[1]:1
This would probably be quite easy to implement (just replace rvalue[2] by rvalue[2:end] whenever there is an ellipsis), very natural to understand, and does not overwrite any existing syntax. It also provides a nice way of dealing with lists (LISP-style).
Also, while I'm writing about tuples, this is a bit surprising:
I would argue that there is at least a missed warning here (in the first line, while I understand that this is lowered as head=(1,2,3,4)[1]; tail=(1,2,3,4)[2], it should warn that the lvalue tuple is too short), and some strange behavior of the assignment operator (it is very weird that an expression of the form A=B does not return the value of A).
The text was updated successfully, but these errors were encountered:
All is in the title. Currently this syntax is not understood:
ERROR: syntax: invalid assignment location "b..." around REPL[1]:1
This would probably be quite easy to implement (just replace
rvalue[2]
byrvalue[2:end]
whenever there is an ellipsis), very natural to understand, and does not overwrite any existing syntax. It also provides a nice way of dealing with lists (LISP-style).Also, while I'm writing about tuples, this is a bit surprising:
I would argue that there is at least a missed warning here (in the first line, while I understand that this is lowered as
head=(1,2,3,4)[1]; tail=(1,2,3,4)[2]
, it should warn that the lvalue tuple is too short), and some strange behavior of the assignment operator (it is very weird that an expression of the formA=B
does not return the value ofA
).The text was updated successfully, but these errors were encountered: