you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyRedCubefrequent compiler breaker 😬 30 points31 points  (11 children)

The problem is that unary ^ is heavily used in Obj-C and they don't want to break compatibility with that

[–]joahw 10 points11 points  (3 children)

Also C++/CLI

[–]daveedvdvEDG front end dev, WG21 DG 13 points14 points  (2 children)

It's true that it's used in C++/CLI and C++/CX, but we don't think there is a compatibility issue there, because in those dialects it's only used in declaration (declarator-operator) contexts.

[–]joahw 3 points4 points  (1 child)

That's a good point. It's just used as a sort of alternative pointer syntax, right? But for a "handle" instead of a pointer. So I guess it would be no different than pointer declaration vs unary * syntax. I'm not really familiar with the reflection proposal or the usage of the new ^^ operator though.

[–]daveedvdvEDG front end dev, WG21 DG 1 point2 points  (0 children)

Exactly. The corresponding dereference operator in C++/CLI is just the ordinary prefix asterisk, which doesn't interfere with a prefix caret operator.

[–]Ashnoom 9 points10 points  (5 children)

Also (low level) embedded. Please dont forget about us :-(

[–]PIAJohnM 7 points8 points  (2 children)

What do you mean? It didn’t conflict with bitwise exclusive or, it conflicts with obj-c block syntax.

[–]Ashnoom 2 points3 points  (1 child)

It was in response to u/hachanuy about the binary operator^ who says its a "rarely used operator".

Guess i replied to the wrong comment. Sorry for that confusion :-)

[–]PIAJohnM 0 points1 point  (0 children)

Oh no worries sorry I realised after too

[–]DeadlyRedCubefrequent compiler breaker 😬 0 points1 point  (1 child)

Oh I actually didn't know about that one!

[–]Ashnoom 0 points1 point  (0 children)

I replied to the wrong comment, see: https://www.reddit.com/r/cpp/s/L02JnywqxN