Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl's Bad Ideas

by clintp (Curate)
on Apr 06, 2002 at 01:41 UTC ( #157099=note: print w/ replies, xml ) Need Help??


in reply to Perl's Bad Ideas

Wow. $#arr is mild. How about:

  1. v-strings. Horrible idea, badly implemented, and the cause of many unforseen consqeuences. TIMTOWDI gone stupid.
  2. pseudohashes. Another bad idea implemented poorly. The actual usefulness of these is minimal, and places where they can be used *correctly* are usually contrived examples. More TIMTOWDI gone stupid.
  3. global $|, $/, $\, etc.. instead of per-filehandle.
  4. I agree with Dominus about strigified references. Although I admit to printing them just to see what's inside sometimes... that could be fixed by tinkering with print instead of strigifying things. Laziness gone horribly awry.
  5. $ used on single elements of hashes and arrays.
  6. <> globbing
And probably more that I can't think of at the moment, it's been a long week. For a *real* thread-burner, ask me about those features of perl that I *adore* that everyone else hates. :)


Comment on Re: Perl's Bad Ideas
Re: Perl's Bad Ideas
by Dominus (Parson) on Apr 06, 2002 at 02:20 UTC
    Says clintp:
    For a *real* thread-burner, ask me about those features of perl that I *adore* that everyone else hates. :)
    OK, Clinton. What feature of Perl do you adore that everyone else hates?

    For me, $; is probably near the head of the list. Or maybe symbolic references.

    --
    Mark Dominus
    Perl Paraphernalia

      • Perl's laissez faire approach to OO. Most people bitch and moan about it for one reason or another, but I like being able to be as OO as I want to be... or not. It's just so damned easy to do exactly what I want, I figure those that complain are either grinding axes or bondage freaks.
      • Punctuation. I love punctuation. It doesn't look like programming without the line noise. Do this, don't do that, can't you read the signs?
      • Built-in networking and IPC functions. This is what turned me on to Perl in the first place (and scarred me for life from TCL). We don' need no steeeenkin modules.
      • eval string
      • Globs. They're fun to say. GLOB GLOB GLOB GLOB GLOB. And they're fun to use.
      • package variables. It seems everyone's got a hard on for lexicals. my() this, my() that. Sounds like a bunch of three year olds. Gimme a namespace and chuck use strict and I'm happy. /me hugs local() too
      • Punctuation variable names. Wait. That goes with my punct fetish.
      More later...
Re: Re: Perl's Bad Ideas
by belg4mit (Prior) on Apr 06, 2002 at 03:47 UTC
    3. I personally don't hate these. Once you learn to scope your variables (and these can be a great motivator to learn). OTOH I can understand the desire for per-FH, but it seems like globally settable *defaults* might be nice.

    5. *sigh* yeah the sigil thing is hard on beginners, now however I am not happy about having to switch back... In some ways it does make sense as well, $ is scalar and you're getting a single element (scalar) out. Slices use @ denoting multiple elements returned.

    6. Why? Implementation, or too much for one operator?

    --
    perl -pe "s/\b;([st])/'\1/mg"

      Says belg4mit:
      6. [ <> globbing was a bad idea ] Why? Implementation, or too much for one operator?
      Too much semantics on one piece of notation. If Larry hadn't unnecessarily overloaded <> to do globbing, then you would be able to write
      @array_of_fhs = ...; my $line = <$array_of_fhs[37]>;
      Which you can't presently do, and which frequently trips people up. Without the glob overloading, this would have meant just what it appears to.

      --
      Mark Dominus
      Perl Paraphernalia

        >Too much semantics on one piece of notation. If Larry hadn't unnecessarily overloaded <> >to do globbing, then you would be able to write
        That's what I said, or rather asked if that was why clintp disliked it.

        As for the catch, yes. I have had to resort to readline before because of that.

        --
        perl -pe "s/\b;([st])/'\1/mg"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-08-21 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls