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
Wh开发者_StackOverflow中文版y would this be considered important?
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.
Maybe the editor developers were lazy and used a common set of reserved keywords across languages?
精彩评论