[Python-Dev] Parrot -- should life imitate satire?
Sun, 12 Aug 2001 00:23:42 -0400
on Thursday, August 02, 2001 1:30 PM]
> Oh, and here's our divide, for comparison:
> dSP; dATARGET; tryAMAGICbin(div,opASSIGN);
> NV value;
> if (right == 0.0)
> DIE(aTHX_ "Illegal division by zero");
> value = left / right;
> PUSHn( value );
> See, this is why we need a new interpreter. :)
Yes, I've tried to read the Perl source before <snarl/wink>. What does "/"
mean here? You're using native C arithmetic, or is this a C++ overload?
Even simple arithmetic is long-winded in Python, because, for example, the
int operations check for overflow, while the float operations allow for
catching IEEE-754 exceptions (or SIGFPE in general) and translating them
into Python-level exceptions. We also go thru piles and piles of code
coercing among different numeric types. If you were to step thru the Python
x = 3.0 / 4
in a debugger, it's a race on Windows between your finger getting numb and
the OS crashing ...