Hacker News new | ask | show | jobs
by adrian_b 2 days ago
I agree that a language should also provide integers of unlimited size (possibly also non-negative integers of unlimited size) like many LISP variants, Python etc.

Integer range types, like in Pascal and Ada, should also be available.

Such types should better be used wherever possible, to reduce the probability of bugs and to make the programs more portable.

Nevertheless, all the fixed-size integer types that are directly implemented in hardware (which currently are the 8 types enumerated above, with 5 sizes from 8 bits to 128 bits, but not all combinations of type and size are provided by the existing CPUs) must also be provided as primitive types by a programming language, to be used when maximum efficiency is necessary, because the difference in performance between using them and using software-defined types can be very large.