Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: TMTOWTDI... and most of them are wrong by adrianh
in thread TMTOWTDI... and most of them are wrong by tlm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found