On Tue, Sep 16, 2003 at 08:35:02PM -0400, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
there's no difference between single and double quotes and then whines about the "mystical" behavior when the single quoted "strings" are used in place of real strings.
Not really. Usually compiler signals an error when quotes are misused (at least Pike/C will - double quotes are strings, while singe quotes are ints).
Just out of curiosity, do you think that testing on run time types (i.e. use of intp, objectp, arrayp etc) is evil in general or is it evil only when used to tell the two numeric types apart?
Well... Frankly, it is useful, sometimes :) And I've no choice when I want to make run-time checks in function/operator which may take arguments of different types.
But something like "function prototypes" (as in C++), where compiler (or runtime) makes the decision which function to call (based on argument types) is more convenient.
in those cases. Since Pike isn't strongly typed it's very hard to avoid the runtime type checks that it must do on every operand.
Why? What is the point to have types (compile time) at all? If we know the type of some variable at compile time (and flag this), there is no need to make typechecks during runtime, or?
Regards, /Al