Front page | perl.perl5.porters |
Postings from October 2009
Re: do SUBROUTINE(LIST)
From: Tom Christiansen
October 26, 2009 18:18
Re: do SUBROUTINE(LIST)
Message ID: 469.1256606203@chthon
> jesse wrote:
>> How much will this removal win us in terms of memory,
>> performance, code cleanliness?
> Only some cleanliness. Actually, more important than code
> cleanliness, it wins us some *conceptual* cleanliness.
>> Is this code-path special in some way or just a pet
> Neither. I just ran into it; I'm doing deep magic with
> subroutine calls, and this came up as a rather unnecessary
> case that I needed to consider.
>> What other long-deprecated features should we -also- be
>> yanking for 5.12?
> Quick grep for deprecation warnings in 5.10.0:
> "do" to call subroutines
What, like you have no cpp? And how'd *that* happen?
Wait, I know: because you build perl on a different
system than it's targetted for--right? So your
build system has a cpp and your install system
does not? Hm. Famous last words, I know, but
just how hard could this be?
> a hash as a reference
> an array as a reference
> array missing the @ in argument
> bare << to mean <<""
> chdir('') or chdir(undef) as chdir()
> comma-less variable list
As in? I don't imagine you mean dative
notation here, so what is this, exactly?
> hash missing the % in argument
> implicit split to @_
> inherited AUTOLOAD for non-method
Don't think so.
> my() in false conditional
> opening dirhandle also as a file
> opening filehandle also as a directory
This has always been an unfortunate oddity. It's also gotten in
the way of letting the input operator operate on <dirhandles> via
readdir() analogously to operating on <filehandles> via readline().
I have no particular fondness for such typed namespace
confusions, and some unfondness. Do not, though, define
yourself by the negative. Define yourself by the positive:
do *more* than break the link with the past.
Finish the model by mapping <dirhandle> into a (?conditional)
call to readdir(), just as <filehandle> now goes to readline()
and <*.[ch]> to glob(). Don't forget context sensitivity, but
this may "fall out" of the mapping considering how readdir()
already understands its context and returns appropriately.
> To a first approximation, I think all of these
> should become fatal errors in 5.12.
To a first approximation, I think you introduce
an explicitly radical-severing nanny-pragma like
no compatibility "perl4";
no compatibility "perl1" .. "perl4";
or else it's
I'm probably wrong.