Why I love python.
npat at efault.net
Fri Aug 13 14:41:07 CEST 2004
On 2004-08-13, John Roth <newsgroups at jhrothjr.com> wrote:
>Nick Patavalis <npat at efault.net> wrote:
>> You 're right, I was maybe a bit too dogmatic on my point. But you
>> must accept that JIT-compilers are, nevertheless, compilers! They may
>> be more intelligent and more flexible than traditional "ahead of time"
>> compilers, but still they are fundamentally compilers. Furthermore,
>> for most cases, it might be possible for an AOT compiler to produce a
>> "binary" that doesn't contain the compiler itself.
> It's generally regarded as not worth doing, simply because
> JITs might compile different code for each time through a
> method if the signature changes dynamically.
What is regarded as not worth doing? I don't really understand this
> Declarations don't help unless they can provide a solid
> guarantee of the variable's type. If they can't, they're
> useless because the JIT has to insert the type checking
> code anyway.
Agreed! The only way to avoid type-checking at runtime, it to have
static typing, but nobody wants this, do they? Declarations though can
help by indication to the compiler what types of applications it's
worths to optimize (i.e. do the best you can for strings, but for ints
and foats I do want this code to be fast).
More information about the Python-list