Because Pike, unlike C, isn't statically typed; each value carries its type in Pike. You can put an integer in a variable of type mixed and when you later read the variable there's still an integer in it; you'll get a complait about the incorrect type if you try to index it like a string, while in C you'd get a segfault or worse.
In a (probably fairly far off) future we might have a compiler that is smart enough to exploit the types in the source to at least ignore the type info in the values, but that will never work all the way. There will always be many places where the code needs to check the type in the value to treat it correctly.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-02-27 03:04: Subject: Re: 64 bit ints
On Thu, Feb 27, 2003 at 12:05:03AM +0100, Per Hedbor () @ Pike (-) developers forum wrote:
Each and every place that use integers in pike would have to check for unsigned and signed integers.
Why? And where? Why not to ignore this and let it behave like in C?
/Al
/ Brevbäraren