5 ms·
Although many static languages do force you to choose a width for your integers, there is no inherent connection between static type systems and fixed-width int
by chc 15y ago
Although many static languages do force you to choose a width for your integers, there is no inherent connection between static type systems and fixed-width integers. For instance, Haskell is one of the most strongly static languages out there and it has an unbounded Integer type. The connection between static typing and integer overflows is an artifact of older statically typed languages like C whose type systems were designed to model the hardware.
- akkartik 15y agoAh, good point. So the whole notion of unboxed integers seems increasingly orthogonal to dynamic typing. And now so do explicit variable declarations (http://news.ycombinator.com/item?id=3633520 http://news.ycombinator.com/item?id=3633520).