New C++ experimental feature: The tadpole operators--Raymond Chen

You should read about this amazing new feature:

New C++ experimental feature: The tadpole operators

by Raymond Chen

From the article:

How often have you had to write code like this:

x = (y + 1) % 10;
x = (y + 1) * (z - 1);
x = (wcslen(s) + 1) * sizeof(wchar_t);

Since the + and - operators have such low precedence, you end up having to parenthesize them a lot, which can lead to heavily nested code that is hard to read...

Once you have been thoroughly amazed, you should also read this article:

The tadpole operators explained

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.