[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

Re: [ba-unrev-talk] Humble pie in academia

stephen white wrote:    (01)

> I didn't really understand OO until I learned Ruby. It would be faster
> for you to spend a couple of days learning Ruby (read the online book
> 'Programming Ruby') to understand what OO is about, then go back to
> Java where everything is hidden under layers of bizarre syntax and bad
> ideas.    (02)

Hey! Thanks for the tip. Ruby looks really interesting, indeed!
(I'm a sucker for a better language. After 20-some, I'm *still*
looking for the "ideal" language for my purposes.)    (03)

I really like this guy's philosophy, right off the bat. The fact that is
an object-oriented *scripting* language is fascinating, right at the
outset.    (04)

Quotes from the intro:
   * "I wanted a language more powerful than Perl, and more
       object-oriented than Python. "    (05)

   * "Ruby is actually more popular than Python in Japan right now."    (06)

   * "I believe that the purpose of life is, at least in part, to be happy.
       Based on this belief, Ruby is designed to make programming
       not only easy, but also fun. It allows you to concentrate on the
       creative side of programming, with less stress."    (07)

  * "Ruby follows the Principle of Least Surprise---things work the
      way you would expect them to"    (08)

  * "It is easy to extend, both from within the language and by linking
      in third-party libraries. It is portable across a number of
platforms."    (09)

  * "We've used Ruby to implement parts of an X11 window manager,
     a task that's normally considered severe C coding. Ruby excelled,
     and helped us write code in hours that would otherwise have taken
     days."    (010)

Sample code:
      class SampleCode
           def run
      end    (011)

      Fred#doIt     -- invoke an instance method
      Fred.new      -- invoke a class method
      Fred::EOF  -- reference a class constant    (012)

>From SlashDot:
   * To print "Ho Ho Ho" in Java, you have to write code like this:
             for (int i=0; i 3; i++)  {
                System.out.print("Ho ");
       In Ruby you write:
            3.times do print "Ho " end.    (013)

  * Most of the advantages being quoted are "ease of use", "rapid
     development", etc. Fine. But what about runtime?    (014)

  * This looks really cool. Sure beats the hell out of learning Perl for
     system administration scripts    (015)

  * Ruby is the result of Perl and Smalltalk having a baby.    (016)

  * Ruby is especially popular amoung Smalltalk users.    (017)

  *  So when are we going to see this at ICFP? (programming
     contest) Oh wait, we already did, all the ruby entries failed.    (018)