Front page | perl.perl5.porters |
Postings from October 2009
Re: do SUBROUTINE(LIST)
Thread Previous
|
Thread Next
From:
Tom Christiansen
Date:
October 26, 2009 18:18
Subject:
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
>> antifeature?
> 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
NO!!
> *glob{FILEHANDLE}
Ok.
> -P
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?
> :unique
Ok.
> a hash as a reference
Ok.
> an array as a reference
Ok.
> array missing the @ in argument
Ick! Ok.
> bare << to mean <<""
Oh no.
> chdir('') or chdir(undef) as chdir()
Possibly.
> comma-less variable list
As in? I don't imagine you mean dative
notation here, so what is this, exactly?
> defined(%hash)
> defined(@array)
Oh, probably.
> hash missing the % in argument
Ok.
> implicit split to @_
Because?
> inherited AUTOLOAD for non-method
Don't think so.
> my() in false conditional
Perhaps.
> 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;
no compatibility "perl4";
no compatibility "perl1" .. "perl4";
or else it's
no perl;
for you.
I'm probably wrong.
--tom
Thread Previous
|
Thread Next