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
Right now, ~[1,2,3].to_str() is the same as ~([1,2,3].to_str()), which is confusing because in the case of of strings and vectors, the sigil is basically part of the literal.
If pointer boxing gets at least a higher priority than method application, ~[1,2,3].to_str() would mean (~[1,2,3]).to_str(), and you'd have to add explicit delimiters to box the whole method chain, like so: ~([1,2,3].to_str())
Which, I think, would be more intuitive: A pointer sigil puts the thing right next to it in a box, if you want to box the result of an complex operation, but it in brackets.
The text was updated successfully, but these errors were encountered:
Right now,
~[1,2,3].to_str()
is the same as~([1,2,3].to_str())
, which is confusing because in the case of of strings and vectors, the sigil is basically part of the literal.If pointer boxing gets at least a higher priority than method application,
~[1,2,3].to_str()
would mean(~[1,2,3]).to_str()
, and you'd have to add explicit delimiters to box the whole method chain, like so:~([1,2,3].to_str())
Which, I think, would be more intuitive: A pointer sigil puts the thing right next to it in a box, if you want to box the result of an complex operation, but it in brackets.
The text was updated successfully, but these errors were encountered: