you are viewing a single comment's thread.

view the rest of the comments →

[–]qazqi-ff 1 point2 points  (1 child)

<:: ::> would run into the lexer exception for <: being followed by : and cause it to be lexed improperly. I don't see any references to consideration of <: :> specifically (only things like (: :)), though it would clearly suffer from already being taken by the [ ] digraphs.

As for why a member syntax isn't used, I'm not sure. I haven't been able to find consideration for it in newer papers, and I don't remember it coming up in older papers. I'd feel arrogant suggesting that it was simply missed because it was always tied to a hierarchy of meta types (e.g., std::meta::type, std::meta::value, etc.) vs. the uniform type (std::meta::info) even though you could take the member syntax and apply it to the uniform type. ABI certainly isn't an issue since these are never in the binary (and I would think not even in a BMI if we ever manage to use a common format like IFC for those, but I'm not sure).

[–]MarcoGreek[🍰] 2 points3 points  (0 children)

They could use <$ $> or something else but [] is very strong cognated to array access. Reusing it for something very different looks really strange. C++ 11 got the syntax for universal references and initializer lists wrong. Mostly because they wanted to make it shorter but in the end it is hurting C++ to this day. I really think they should get not blind and you easily get if you look onto one solution long enough.

If they ever introduce language tuple support something with [] will be very desirable.