Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
... it distinguish between objects and non-objects and can apply generic method calls. So what; Java does this as well and Java is not any better for it.

Java doesn't do this; that's one of the most persistent (and damning) criticisms of Java's design.

I think the issue I have is that it is not really solving anything.

Have you ever written code that has to figure out whether you have a scalar, a scalar reference, an array reference, a hash reference, a class name, an object, a tied variable, a reference blessed into a class but treatable as an opaque object and not a reference type?

Have you ever written code with the simple precondition that one of its arguments must somehow stringify sanely -- you don't care how it does that, merely that it does that -- but the mechanism for type checking in Perl 5 is so disjointed and bicameral that it's almost impossible to write a check that's both correct and not so strict that it prevents useful (and common) behavior?

Have you ever thought to yourself "Self, tie would be so much more useful if it weren't a righteous pain to use!" or "I like the idea of overload, but ... wow, what a mess!"?

I've done all three.

I fail to see the benefit of trying to make Perl act like Ruby.

I fail to see the problem of borrowing good ideas from other languages (and you mean Smalltalk, not Ruby) if they solve very real, very painful problems in an elegant way.

If you have a criticism of autobox better reasoned than "If you want to use Ruby, you know where to find it!" I'm happy to discuss that... but Perl 5's primitive obsession extrudes from the VM level and makes things like tie unnecessarily complex. Major credit should go to chocolateboy for creating something which people can experiment with to discover how the language could look without the historical baggage of implementation.


In reply to Re^6: What are the drawbacks of autobox? by chromatic
in thread What are the drawbacks of autobox? by LanX

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 musing on the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found