[PLUG] Is PHP a good intro programming language?

Phil Tomson ptkwt at aracnet.com
Thu Jan 30 22:32:02 UTC 2003


On Thu, 30 Jan 2003, Steven Adams wrote:

> On Thursday 30 January 2003 09:05 pm, Phil Tomson wrote:
> > On Thu, 30 Jan 2003, Vincent Yau wrote:
> > > While we are on this thread, can someone suggest a good book on Ruby?
> >
> > The best book to start with is:
> > "Programming Ruby: The Pragmatic Programmer's Guide" by Dave Hunt and
> > Andrew Hunt.
> >
> > It's available online at:
> > http://rubycentral.com/book/index.html
> > ... or in dead tree version at Powell's.
> >
> > Also, we have a monthly PDX.rb meeting of Rubyists on the second Monday of
> > the month.  If you want to be on the PDX.rb mailing list send me an email.
>
> Hey Phill,
> I have never heard of Ruby, could you post a quick overview?
>

The quick overview of Ruby:

It was developed by Yukihiro Matsumoto in Japan in the mid-90's.  He liked
a lot of Perl's power (regexen, string manipulation, arrays, hashes, etc)
but he wanted something much more object oriented (on par with SmallTalk).
He didn't find Python to be object oriented enough to suit his tastes so
he developed his own language: Ruby.  In developing Ruby he borrowed
a lot of ideas from Perl, Lisp and  SmallTalk.

*Ruby is a dynamically typed language (but 'type' is primarily determined
by what messages an object can respond to).
*Ruby's object model is single inheritance with mixins
  - you can mixin modules of methods into a class (thus adding both
    interface and implementation, unlike Java which only allows you to
    add interface and you add the implementation seperately)
  - you avoid the trouble with multiple inheritance but can get
    implementation and interface from multiple mixins.
*Ruby is extremely dynamic:
  - classes are always open, so you can add methods to them at runtime
(for example)
  - there really isn't much difference between runtime and compiletime
    which allows you to do things like conditional inheritance or
    conditional mixins (and lots of other cool things).
  - you can add methods to individual objects (singleton methods)

Here's a Ruby intro article I wrote for Freshmeat about a year ago:
 http://freshmeat.net/articles/view/358/

Here's a good article on Ruby in Software Development magazine:
http://www.sdmagazine.com/documents/s=7726/sdm0212d/sdm0212d.htm

Also:

http://www.ruby-lang.org  -  Ruby's home
http://www.rubycentral.com - online "Programming Ruby" book available here

...that should get you started.
Have fun.

Phil





More information about the PLUG mailing list