What is the difference between Short and Character apart from processing?

前端 未结 2 1593
傲寒
傲寒 2021-01-05 08:18

For what I know:

  • \"bytewise\", it looks like they are the same (they are both 2 bytes long);
  • Character, however, has more processing to i
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-05 08:48

    They're currently incompatible, and that could never be changed. But to guess why they were originally different -- it's probably a really good idea to have different types for numerical data and letters, even if their contents work exactly the same way, just to avoid getting them mixed up. That would be bad.

提交回复
热议问题