Still no support for keywords like "and" in VC++ - by Konrad L. M. Rudolph

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 312168 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 11/25/2007 6:02:26 AM
Access Restriction Public


The newest version of the VC++ compiler and the IDE still does not offer support for the alternative keyword versions of operators such as "&&" and "||". These keywords are part of the 1998 C++ standard (defined in section [lex.digraph]) and are a very helpful addition to the standard due to their (arguable) enhanced readability.

As a workaround the standard header <ciso646> can be included. However, this is unsatisfactory as it does not enable proper syntax highlighting for these keywords, making them unnecessarily hard to distinguish from identifiers. Additionally, this entices some programmers to use these unreserved keywords as identifiers in their code which, in turn, leads to problems in bigger projects where such incorrect identifiers are used in header files.

(The bug also applies to the final version of the VC++ 9.0 compiler, as shipped with the Express Edition.)
Sign in to post a comment.
Posted by Konrad L. M. Rudolph on 11/26/2007 at 10:25 PM

you said:

> To be honest you are the first person to ever request something like this.

I'm not really surprised. However, in my experience many C++ programmers react in two ways to these keywords in C++. Some had no idea that such things were possible in C++ but liked it because of its clarity. Many of the programmers who know of this feature don't use it because they argue that major compiler vendors don't support it. Which induces an obvious cycle if your argument for not introducing it is lacking requests. Using ciso646 is no real alternative for the reasons stated above (additionally, programmers are lazy. Who wants to include a header file in every file they use?).

Anyway, the feature seems well liked and broadly adapted in other languages which provide both alternatives, textual keywords as well as "ASCII art" boolean operators (PHP, Ruby). I see no reason why C++ should fare otherwise. Are there reasons for not including these keywords? I am aware that generally including new features has quite an administrative overhead additionally to implementing them. However, in this simple case ...
Posted by Microsoft on 11/26/2007 at 8:34 AM
Hi: #include of <iso646.h> (or ciso646) is how we support these keywords: and currently have no plans to change this. To be honest you are the first person to ever request something like this.

Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 11/25/2007 at 12:02 PM
Thanks for your feedback. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team