Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Never

by Abigail-II (Bishop)
on May 12, 2003 at 23:09 UTC ( [id://257594]=note: print w/replies, xml ) Need Help??


in reply to Never-to-use Perl features?

  • Objects.
  • Prototypes.
  • $*, $[, $#
  • dump
  • Having both 2-arg select and 4-arg select.
  • Global $/, $\, $,, $| instead of per handle settings.

Abigail

Replies are listed 'Best First'.
Re^2: Never (these?)
by Aristotle (Chancellor) on May 13, 2003 at 02:56 UTC
    They are all problematic, but do they fall into the "never use this feature" category? (Granted, you're not someone I'd expect to put anything there at all.)

    Makeshifts last the longest.

Re: Re: Never
by Juerd (Abbot) on May 12, 2003 at 23:41 UTC

    Objects.

    Are these blessed values or something else? And why are they wrong?

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      They are wrong because you have only one instance variable. Everyone would think it's odd if subroutines can have only one variable - it would still be workable of course, you'd just use a hash and put all your variables in that. Perl would be mocked at for having such silly subroutines, and it would have been fixed years ago.

      Why people accept such sillyness with objects, I don't know. But then, people accept Microsoft Windows as well.

      Abigail

        Actualy, subroutines in Perl do only have a single instance variable. In fact, it isn't even a variable. It's a list that gets associated with @_.


        Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: Re: Never
by Itatsumaki (Friar) on May 14, 2003 at 16:10 UTC

    You don't like prototypes? Why's that?

    -Tats
      sub foo ($$) { } my @bar = (1, 2); foo (1, 2); # Fine. foo (@bar); # Compile time error.

      Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found