tags:

views:

189

answers:

3

A popular editor uses highlighting to help programmers avoid using C++ keywords in Java. The following words are displayed using the same colors as a syntax error:

auto delete extern friend inline redeclared register signed sizeof
struct template typedef union unsigned operator

Why would this be considered important?

+7  A: 

To avoid confusion. The largest migration path in the entire industry over the last 15 years was from C++ to Java. Thus, it would be wise to avoid using those words in a new context where they no longer mean anything.

James Baker
A: 

Maybe the editor developers were lazy and used a common set of reserved keywords across languages?

ykaganovich
Yes, but then why would it use the syntax error colors?
Justin Ethier
A: 

If you have to ask, you'll never know.