develooper Front page | perl.perl5.porters | Postings from December 2008

Re: [PATCH] Class as a Feature (take four)

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
December 16, 2008 00:28
Subject:
Re: [PATCH] Class as a Feature (take four)
Message ID:
b77c1dce0812160028m7a0b8b92tbef80231aa16cdcd@mail.gmail.com
2008/12/16 chromatic <chromatic@wgz.org>:
> Imagine if feature.pm had existed in the days of 5.6.0, and the only way to
> get lexical filehandles was to say something like:
>
>        use 5.006;
>        use feature 'lexical_filehandles';

That's not a good example -- lexical filehandles are a syntax
addition, not a keyword addition.

Likewise, using "my $_", ~~ or // doesn't need "use feature" in 5.10.
There is usually enough context and dwimmery built-in to avoid
confusing ~~ with a doubled unary ~ or the defined-or with an empty
regex.

I think the only keyword added in 5.6 was lock, and it wasn't a proper
keyword. But weak keywords are a pain for writing maintainable
programs, because they are affected by action at distance. I see
feature.pm as an improvement over weak keywords.

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