开发者

Why would you avoid C++ keywords in Java?

开发者 https://www.devze.com 2022-12-25 03:11 出处:网络
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:

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消