develooper Front page | perl.perl5.porters | Postings from July 2014

Re: New feature proposal : <<>> to disable magic open of ARGV

Thread Previous | Thread Next
July 27, 2014 18:19
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
On Sat, Jul 26, 2014 at 06:38:03PM -0400, Ricardo Signes wrote:
> Here's my counter-proposal on bike-shedding:   no more using the phrase
> bike-shedding.  It's now used to mean "somebody wants to talk about something
> where I think I'm already right," and it's too emotionally charged.  If you
> think someone is debating pointless trivia, suggesting changes of no
> consequence, or can't see the forest for the trees, point out the specific
> problematic behavior.

Hear, hear.

It always irks me if people complain that there are a lot of comments
how a proposed feature looks, and far less on how it's implemented.
Or that non-visual changes hardly get comments at all.

But guess what. How something looks actually matters to people. A lot.
You can design a perfect car, but if it looks ugly, it won't sell
very well. And that's also why a lot of big companies A/B test things
on their website that are nothing but appearance. Because it matters.
(And physical products are often tested for their appearance in panels
as well).

And if one goes outside of the echo chamber where everything Perl
is praised, what's the biggest complaint about Perl? Not that it's
implemented badly. But that it looks ugly.

How things look matters to Larry as well. To give an example, he once
told that the fact that "last", "next" and 'redo" all use four characters
isn't a coincidence, but it was a deliberate choice. It wouldn't make
the implementation any easier or harder had, say, "redo" be named
"again". But appearance mattered.

Back to the feature itself. I prefer '<<>>' over using a feature. It's
clearer (because you can see what's happening), and, since we're talking
safety, safer. Imagine:

    use 5.022;   # Enables turning off magic-open.


    while (<>) {

Time passes, and the code gets run [1] on 5.20. It dies with a version 
error. Someone removes the 'use 5.022' (what, you've never done that?
I have), and lo, it works. Well, with the safety off.

[1] Code gets moved around, copied, reused, etc.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About