in reply to Re: unquoted string error??!!
in thread unquoted string error??!!

Some Nameless One wrote:
actual filehandles should be kept transparent to the programmer — sometimes a fixed number of filehandles needs to be extended to an arbitrary number
One can also say:
actual subroutines should be kept transparent to the programmer — sometimes a fixed number of subroutines needs to be extended to an arbitrary number
As you see, precisely the same statement can be said in equal measure of subroutine names. So how come we don’t see the PC-police railing against bareword subroutine names the same way they do against bareword filehandle names? Both are global, unsigilled names in a particular package. (You can add to bareword format names to that same list, too.)

Please explain this discrepancy: why complain of one and not the other?






















If Perl meant for you to never use bareword filehandles, it would deprecate them. Since it has not done so apart from those in all lowercase, they are not deprecated, and any attempt to impose any sort of One True Way™ viewpoint against something which is not deprecated by Perl is by its very nature fundamentally anti-Perlish. And that’s not good.

You may extirpate bareword handles, and for that matter dative syntax also, just as soon as you ban all such statements as:

print FH; # send $_ to FH print STDERR "See ya!\n";
Until such time as that should occur, kneejerk responses not to use legal and working Perl, delivered as they virtually always are without amplification and elaboration nor even explanation, seem very much out of step with the fundamentallly liberal, or at least multi-cultural, tone of basic Perl culture.

As someone who has watched that multicultural environment — that is, the founding and abiding principle of There Being More Than One Way To Do It — grow and flourish since Day 1 of Perl 1.0’s initial public release more than 23 years ago, I believe I have enough historical perspective to make the observation that Perl is not about telling people what to do or how they should do it.

For that, there’s always Python. 😱

Replies are listed 'Best First'.
Re^3: unquoted string error??!!
by Anonymous Monk on May 04, 2011 at 15:27 UTC
      I find “modern perl” (by which I only mean the phrase, and not chromatic’s book by the same name!!!) to be a very powerful negative flash word. So do many of the Perl programmers I respect. It gets bandied around in ways that are about as useful as hitting somebody over the head with Perl Best Practices. Read: not!

      If you care about having a name, perhaps you should marks your posts with it instead of going all secret squirrel on us.

        It gets bandied around in ways that are about as useful as hitting somebody over the head

        It is infinitely more useful than your frenzied copy/paste rants.

Re^3: unquoted string error??!!
by anonymized user 468275 (Curate) on May 05, 2011 at 08:39 UTC
    - arbitrary subroutine sets come into play at so high a level of abstraction that only very specific situations can imagineably need them. Multiple filehandles are an everyday occurrence. Unless you're the kind of programmer that still uses global variables for everything, it is necessary to lexically rather than bareword declare filehandles to manage their scope.

    - the bareword is just a syntax. There might be rare occasions where specifying a filehandle as a bareword is needed. What is possible with a language does not mean that anything allowed is good practice. For example, proper indentation is good practice. Python enforces it Perl doesn't - this is a feature of Perl, not a licence to write unreadable code.

    - Only the writer knows if his jerking of a the knee is a kneejerk reaction or a carefully considered jerking of the knee. You don't have a clue.

    - Just because there is more than one way to do something doesn't mean all ways have equal merit all the time.

    - You have a lot to learn!

    One world, one people

      - You have a lot to learn!

      You saying that to him is the funniest thing I've seen here in a long time.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.