Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Tim O'Reilly on Perl

by tlm (Prior)
on Jul 13, 2005 at 22:36 UTC ( [id://474725]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Tim O'Reilly on Perl
in thread Tim O'Reilly on Perl

But progress depends on the seesaw between the better-is-better approach and the worse-is-better approach. The first 14 years of Perl were mostly built on the worse-is-better approach, and eventually you run into the inevitable fact that a large enough pile of worse things ends up stinking.

I'm very intrigued by your post. Can you give an example of "worse-is-better" in the design of Perl before Perl 6?

Update: Clarified the wording.

the lowliest monk

Replies are listed 'Best First'.
Re^4: Tim O'Reilly on Perl
by chromatic (Archbishop) on Jul 14, 2005 at 02:26 UTC

    Perhaps not having strict and warnings on by default in programs (that is, everything except for one-liners) counts.

Re^4: Tim O'Reilly on Perl
by adrianh (Chancellor) on Jul 14, 2005 at 07:25 UTC
    Can you give an example of "worse-is-better" in the design of Perl before Perl 6?

    Not that I can speak for Larry, but I'd see Perl 5's OO model as an example of worse is better backfiring. While it was an elegant and simple way to shim OO into Perl 4 with the minimal of additional baggage, it made other stuff tricky in the longer term.

      Will we have lvalue methods in Perl 6? Because that's what really bugs me, about Perl 5 OO.
      $obj->SetProperty("something");
      is just ugly, compared to the shiny elegance of
      $obj->Property = "something";


      holli, /regexed monk/
        You bet you will have them! Only such a method will be spelled 'is rw'. Well, until Larry changes his mind on this...

        It does indeed have that already.

        use v6; class test { has $.Property; } my $testing = new test; $testing.Property = 5; $testing.Property.say;

        I beleive that it actualy uses a Proxy object with lvalue attributes, but don't quote me on that. ;)


        ___________
        Eric Hodges

        Is there something wrong with Perl 5's lvalue attribute? As far as I can tell, it produces rather functional lvalue accessors:

        package Foo; sub foo : lvalue { my $self = shift; warn "Only first argument to method foo is used" if @_ > 1; $self->{ foo } = shift if @_; $self->{ foo }; } my $x = bless +{}, 'Foo'; $x->foo = 3; print $x->foo, "\n"; $x->foo++; print $x->foo, "\n"; $x->foo += 6; print $x->foo, "\n"; __END__ 3 4 10
        I know that user-defined functions with the lvalue attribute, in general, will give wrong results in the debugger, but that's only a problem for those weenies who use the debugger ;-) (Plus, there are good ways around this.)

        the lowliest monk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://474725]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.