develooper Front page | perl.perl5.porters | Postings from June 2012

Time for a 64-bit perl API?

Thread Next
From:
Dave Mitchell
Date:
June 10, 2012 04:46
Subject:
Time for a 64-bit perl API?
Message ID:
20120610114606.GB2771@iabyn.com
It's generally known that perl has a lot of arbitrary 32-bit restrictions,
both in the code, and in the API; and that attempts to fix the former are
often hampered by the restrictions of the latter.

    $ grep '^A' embed.fnc | grep 32 | wc -l
    252

Perhaps its time to bite the bullet and give perl a whole new 64-bit-clean
API? For example, an av_fetch64() with IV rather than I32 args.

Initially these might just be wrappers around the existing functions
which croak for args > 2^31; but eventually over time as internals get
written to be 64-bit clean, then instead the old functions become wrappers
around the new.

Providing a completely new API might also give use the opportunity to
clean up other aspects of the API, not just 64-bit issues.

Or perhaps XS code could just have

    #define USE_64BIT_API

and magically av_fetch has 64-bit args, and deprecated macros etc are no
longer defined?

I suspect the hardest bit may be dealing with public structs that have
32-bit members.

Anyway, this is all vague hand-waving, in an attempt to start a
discussion.

-- 
O Unicef Clearasil!
Gibberish and Drivel!
    -- "Bored of the Rings"

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About