Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I am really, really looking forward to that. I'm pretty sure I'll use it for new modules as soon as it is available.

As for the reasons, I'll just follow the points raised by 1nickt and explain why my opinions are different.

  • An OO framework in the core is what I expect from a contemporary programming language. I'll expand on this in the last point.
  • bless is fine, but not a framework, and the many degrees of freedom it provides make things complicated when you maintain sources written by different authors. Including packages written by myself if I look at them five years later.
  • The syntax is unPerlish was my first reaction when I attended my first presentation about Moose. Well, technically this isn't even true since Moose itself is Perl, working with Jurassic Perl or better. Nonetheless I decided to give it a try, and I found the benefits well worth the learning curve. I'll do the same when Cor is available, only that this time I'm following the discussion and I know what to expect.
  • (I don't care for the name, so this is just to keep the sequence)
  • Today I am happily using Moo or Moose, though I found that there are a few things which I don't like. In my opinion Cor did nicely build on the lessons learned from Moo*. Some of my itches are:
    • It isn't core. This may be just a formality, but the fact that it isn't core makes it just one of the many OO systems bolted upon Perl 5. It turns out that Perl has a lot of experienced developers, and many of them are pretty opinionated which of them is the Only True one. I hope that an OO system in core will be the primary choice in the future. It won't be perfect for me, maybe it won't be perfect for anybody, but given the open discussion Ovid is moderating here I am optimistic that it will be a system most of us can live with quite fine.
    • The syntax is a bit clumsy. I guess that this can't be avoided if you want to run it on Jurassic Perl, and I still find it amazing that it is possible to implement Moo(se) with the feature set of Perl 5.8. In core, an OO system can do better.
    • The has function is overworked (I seem to recall that there's an article by Ovid about that but can't find it right now). With plain bless, parameters for object creation and object attributes were totally independent (which means you have to code it all by hand), with Moo* everything needs to occur in has (or as a fallback munged in BUILDARGS).
    • An object system in core will be faster than Moo*.

That said, I'm also curious how and when PPI, PPR and the various editor modes will recognize and support Cor.


In reply to Re: Cor—An object system for the Perl core by haj
in thread Cor—An object system for the Perl core by Ovid

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 examining the Monastery: (4)
As of 2024-04-23 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found