Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I've glanced at Ruby before, probably after someone remarked on how clean it is. I just took another look this afternoon, and was once again found myself ready to abandon the attempt without doing anything useful, for the usual reasons:
  • Lack of documentation: If I write a method that takes a block, how do I then pass that block on to another method? The introductory guides give examples, but no general rules for how blocks work. After a bit of searching, I found the Pragmatic Programmers' guide which, although good, appears to be at least a year out of date. And I still haven't found the answer, though I'm not done searching. Then again, maybe I'm just slow or something.
  • Hackishness: The syntax is usually clean, friendly, DWIM, and the like. But when you look at some of the corner cases, it gets frightening. Take a look at this from the doc:
    When Ruby sees a name such as ``a'' in an expression, it needs to determine if it is a local variable reference or a call to a method with no parameters. To decide which is the case, Ruby uses a heuristic. As Ruby reads a source file, it keeps track of symbols that have been assigned to. It assumes that these symbols are variables. When it subsequently comes across a symbol that might be either a variable or a method call, it checks to see if it has seen a prior assignment to that symbol. If so, it treats the symbol as a variable; otherwise it treats it as a method call.
    So if I add a local variable "foo", it can silently mask subsequent calls to a function "foo" that I've been happily calling for a month? Yikes. Sure, Perl has some wierd things going on in places, but they mostly just show up in golf games.
Don't get me wrong -- it's a fun, interesting language; if you squint a bit, it's clean at a higher level. But it still seems like a hack, not a solid foundation for software. I wouldn't trust it with my file system.


In reply to (OT -- ruby) Re: Re: Favorite programming language, other than Perl: by educated_foo
in thread Favorite programming language, other than Perl: by Petruchio

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-07-25 06:13 GMT
Find Nodes?
    Voting Booth?

    No recent polls found