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 06: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 11: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/

        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
        You bet you will have them! Only such a method will be spelled 'is rw'. Well, until Larry changes his mind on this...

        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