Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re (tilly) 2: One more perl programmer's take on Ruby (discussion)

by hding (Chaplain)
on Nov 18, 2001 at 18:54 UTC ( [id://126118]=note: print w/replies, xml ) Need Help??


in reply to Re (tilly) 2: One more perl programmer's take on Ruby (discussion)
in thread One more perl programmer's take on Ruby (discussion)

Hey Tilly. If one knows Lisp, Smalltalk, and Perl (hey, I get to mention my three favorite languages all at once! :-) what new ideas would one learn from Ruby? I've had it on a (very) back burner for a while to look at, but the answer to that question hasn't been clear to me, so I've never gotten around to it, though I'd be glad to if I were convinced it would teach me something.

Replies are listed 'Best First'.
Re (tilly) 4: One more perl programmer's take on Ruby (discussion)
by tilly (Archbishop) on Nov 19, 2001 at 07:52 UTC
    You might learn how well the ideas fit together. Also even with exposure to Lisp you might not be familiar with mixins or the use of anonymous blocks in Ruby. Even with exposure to Perl, you might not realize how well it can be modelled with a class library. And even with exposure to Smalltalk, you might not realize how well the object model works even with a radically different class library.

    I don't know what specifically you would find new. But if you learn it, please tell me what you found out. :-)

      Just to satisfy my own curiousity and see if I really should take a closer look at Ruby - Are the mixins of Ruby significantly different than mixins one would typically use with CLOS? Are the anonymous blocks different than blocks in Smalltalk or lambda forms in Lisp?

      I do find the last point somewhat interesting - it would be interesting to a different class library than a typical Smalltalk's (though some of those are so feature-filled it's hard to imagine needing more :-).

        The point of Ruby's class library is not that it is feature-filled. It is that it resembles Perl, and shares with Perl the ability to make it easy to whip up answers. Any decent Smalltalk has a library that has more features than Ruby. But said library is unlikely to shine in scripts of length 10-50 lines. Ruby behaves similarly to Perl in this space.

        You can get a sense of this by taking a look in the book at the chapter on built-in classes and methods.

        Moving on, I do not believe that Ruby's mixins differ significantly from what you would use with CLOS. I could say that more definitively if I knew CLOS better. As for the blocks, well the block/iterator concept for Ruby is stolen straight from CLU. If you know it there, then you know it in Ruby, right down to using yield to call your associated block as a callback.

        So I don't think there is that many new ideas in Ruby. Just a mix of ideas from different languages in one framework, bound together very well.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found