当前位置: 代码迷 >> 计算机英语 >> seems illogical解决方案
  详细解决方案

seems illogical解决方案

热度:274   发布时间:2016-04-29 12:02:54.0
seems illogical
For language designers, it is worth considering support for unsigned integral types, which eliminate the possibility of sign extension. One might argue that negative hex and octal literals should be prohibited, but this would likely frustrate programmers, who often use hex literals to represent values whose sign is of no significance.


why would prohibiting negative hex and octal literals likely frustrate programmers who think sign is of no significance? is it logical?

------解决方案--------------------
对编程语言设计者来说,考虑无符号的短针类型是值得的,因为这排除了符号扩展的发生。采用这种无符号短整型也可能有发生一个争议,那就是负的16进制和8进制应该排除之外,但是这个将会使那些常用16进制,8进制作为参数的值的程序员很不爽,因为这些参数的值得符号不是那么重要。

为啥非要禁止使用负的16进制和8进制的数,使这些为这个符号不重要的那些程序员感到不爽呢,完全没道理嘛?!
  相关解决方案