4 ms·
> As a concisionist, this change stinks. There's two side to it: it makes creating unique pointers slightly harder, but at the same time it makes (unnecessary)
by masklinn 13y ago
> As a concisionist, this change stinks.
There's two side to it: it makes creating unique pointers slightly harder, but at the same time it makes (unnecessary) overuse of unique pointers slightly harder/less likely, and that looks to be a concern of the core team.
> Designing a language to be prolix just makes code more laborious to understand.
Does it make the code more laborious to understand though? The concept becomes easier to search for and it's easier to talk about it (both because box/boxing is a term of art, and because "box" is a single syllable).
- cgag 13y agowords are easier grep for, but I'd rather read x = (2 * 2)/y instead of "x assign 2 plus 2 divide y"
- pnathan 13y agoThere's a nuance to point #2. The right amount of concision expresses the situation perfectly to someone skilled in the art, without requiring further reading to grasp or without requiring unneeded information to be waded through. (philosophy) A language should support concision to allow those skilled in the art to use their time effectively.
- Alphasite_ 13y agoI would argue that yes, it does. The examples I've seen of the change have become a mess of letters and i'm not too fond of it.
- steveklabnik 13y agoCould you cite some specific examples? I think that'd really help here.
- Ygg2 13y agoWell if you had something like ~Vec<~Vec<~Vec[~T]>> (not 100% realistic example) becomes Box< Vec< Box< Vec< Box< Vec[Box<T>]>>>>> which really looks weird. It's like you have tire marks over your code.
- dbaupp 13y agoSorry, but I think that example is so unrealistic as to not really be worth discussing.
- Pacabel 13y agoI wouldn't be so quick to dismiss it. Maybe that exact situation won't often arise, but in other languages like C++, Java and C# it's not at all uncommon to have nested collections.
- dbaupp 13y agoYes sure; but it is rare to have indirection for every layer of a nested collection (i.e. each collection will essentially be a pointer to some data, with a little bit of metadata (like length & capacity for a Vec), so having Box<Vec<T>> is a pointer to a pointer to the data: essentially pointless!). In other words, one would write Vec<Vec<Vec<T>>> That might be considered ugly, but it's not ugliness caused by the `~` change.
- Ygg2 13y agoCould the opposite happen? What if you have `~~` pointer or `~&~` pointer?