Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Perl allows package names consisting entirely of colons

by ColonelPanic (Friar)
on Nov 27, 2012 at 13:58 UTC ( [id://1005862]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl allows package names consisting entirely of colons
in thread Perl allows package names consisting entirely of colons

I don't think this would not be a significant cost. Only the package declaration would have to be checked (and there is already some checking of package names); everything else would work out to a normal syntax error or a nonexistent package error.

That said, I'm fine with Perl's "if you want to do something stupid, who are we to stop you?" philosophy.



When's the last time you used duct tape on a duct? --Larry Wall

Replies are listed 'Best First'.
Re^3: Perl allows package names consisting entirely of colons
by BrowserUk (Patriarch) on Nov 27, 2012 at 14:37 UTC
    I don't think this would not be a significant cost. Only the package declaration would have to be checked ...

    Is that true? What about?:

    ::::::::fred = 1;

    But also, once you start trying to validate this, what other additional rules are you going to add? Should we allow package _::_::_;?

    That said, I'm fine with Perl's "if you want to do something stupid, who are we to stop you?" philosophy.

    I also think that we should stick to that principle.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.

    RIP Neil Armstrong

Re^3: Perl allows package names consisting entirely of colons
by Your Mother (Archbishop) on Nov 27, 2012 at 18:42 UTC
    …if you want to do something stupid, who are we to stop you?

    I agree while asserting it might be amended–

    …if you want to do something stupid, who are we to stop you? You might be smarter or more creative than we were at that moment in time and it would be wrong to impose our limitations on our audience.

    …while not asserting that I personally might have ever been anything but stupid in this context.

      Or, you may find yourself painted into a corner, whether through your own brushwork or that of some else, and in need of a quick fix now, pending an extensive redesign to accommodate the required fix in an architected fashion.

      All the principles of least surprise and proper encapsulation can -- and should -- be thrown out of the window, when a fix is required now.

      Pragmatism over pontification.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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.

      RIP Neil Armstrong

        Well, my point was freedom over proscription and prescription is the only path that affords growth and that the smartest guy in the room today isn't the smartest guy who will ever visit the room regardless of how many dummies come and go. Talking of, uh, damnit, tye would have the right pun here.

      I agree with you in principle, though this particular case is pretty solidly in the "stupid" category. While I wouldn't advocate for all-colon names to be disallowed, I wouldn't shed a tear over it if they did so.



      When's the last time you used duct tape on a duct? --Larry Wall

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1005862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found