Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: TMTOWTDI... and most of them are wrong

by adrianh (Chancellor)
on Jun 27, 2005 at 02:33 UTC ( [id://470139]=note: print w/replies, xml ) Need Help??


in reply to TMTOWTDI... and most of them are wrong

But although this was all about OOP, I think the same argument can be reasonably extended to programming in general.

In this particular instance I don't think it can. The problem with OO in Perl is not so much TIMTOWTDI, but that there aren't enough ways to do it :-)

Basic encapsulation is much harder than it needs to be in Perl. There are not "natural" ways of doing it. Sure you can do it with inside out objects and code refs, or using one of the many different CPAN modules - but it's a lot more complicated than it needs to be.

Compare to Ruby or Perl 6 where there are language constructs that support encapsulating state and hiding implementation naturally and simply.

Ruby and Perl 6 have more ways of doing good OO than Perl 5, not fewer. However since these mechanisms more naturally support what people want to do you end up with clearer code. Which is as it should be.

The problem isn't too much freedom, but lack of features. TIMTOWTDI is only causing problems because different people have invented N different ways of getting over the lack of features and they don't always play nice together.

I suspect that the philosophy behind Perl 6 is not very different from that behind previous versions of Perl:

It isn't. However Perl 6 makes many of the things that were hard in Perl 5 easy by providing more and better tools.

  • Comment on Re: TMTOWTDI... and most of them are wrong

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-18 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found