develooper Front page | perl.perl5.porters | Postings from September 2011

Re: The future of POSIX in core

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
September 2, 2011 11:47
Subject:
Re: The future of POSIX in core
Message ID:
20110902184726.GF23881@plum.flirble.org
You know how one sends e-mail, and then realises immediately afterwards the
error or omission:

On Fri, Sep 02, 2011 at 07:40:14PM +0100, Nicholas Clark wrote:

> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/9509/msg00666.html

: The main win at this point is that we can say
: 
:     sub AAA () { 1; }
:     sub BBB () { 2; }
: 
: and the user can say AAA + BBB and get 3.
: 
: I'm not quite sure how this interacts with autoloading though.  I fear
: POSIX.pm will need to say
: 
:     sub E2BIG ();
:     sub EACCES ();
:     sub EAGAIN ();
:     sub EBADF ();
:     sub EBUSY ();
:     ...
:     sub _SC_STREAM_MAX ();
:     sub _SC_TZNAME_MAX ();
:     sub _SC_VERSION ();
: 
: unless we can figure out how to efficiently declare a default prototype
: at import time.  Meaning, not using eval.  Currently
: 
:     *foo = \&bar;
: 
: (the ordinary import mechanism) implicitly stubs &bar with no prototype if
: &bar is not yet declared.  It's almost like you want an AUTOPROTO to
: go with your AUTOLOAD.
: 
: Another thing to rub one's 5 o'clock shadow over is that there's no way
: to apply a prototype to a method call at compile time.
: 
: And no, I don't want to have the
: 
:     sub howabout ($formal, @arguments) { ... }
: 
: argument right now.
: 
: Larry

So, Larry does mention POSIX in it, but not for the reason we are discussing
here. And it took another 10 years to find a solution to the problem with
prototypes on constants in POSIX (and all the other modules)

Nicholas Clark

Thread Previous | 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