Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Syntactic Confectionery Delight
 
PerlMonks  

My own "why I like Ruby" list

by kapper (Chaplain)
on Oct 26, 2000 at 21:36 UTC ( #38686=note: print w/ replies, xml ) Need Help??


in reply to RE: Where's Ruby?
in thread Other programming language I most often use

  • It is truly an object oriented language... no hybrid datatypes!
  • Prototype OO style singletons, ie. you can add methods to allready instantiated objects
  • Concept of iterators native in the language
  • A lot of nice Perl'ishness.. ex. regexps and $_


Comment on My own "why I like Ruby" list
RE: My own
by merlyn (Sage) on Oct 26, 2000 at 21:41 UTC
    It is truly an object oriented language... no hybrid datatypes!
    When I gave it a glance a while back, it didn't look like you could subclass or extend the built-in classes. Did I read that wrong?

    Or am I just confusing it with that so-called OO language being hyped by Sun? {grin}

    -- Randal L. Schwartz, Perl hacker

      The following code will output Ruby is a great language!
      a="Perl" def a.+ other "Ruby"+other end a+=" is a great language!\n"
      So, ruby does actually allow you to extend and redefine it's built-classes.. the example also works if you define a new class which inherits String, instead of using singleton style inheritance.. I have not however tested this with every built-in class, but those I have tried it with, worked fine!

      Or am I just confusing it with that so-called OO language being hyped by Sun? {grin}
      He he... probably... I have had alot of beginners getting really confused over the hybrid style of Java...
        Having looked at it recently I think that there may be a couple of exceptions. Specifically Fixnum. However since that is just an internal representation of Integer I don't think there is any practical limitation there.
      Heh, no, Ruby is much more dynamic than that :) You can subclass, extend, etc. to your heart's desire.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-04-20 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls