REPOST: Re: Two languages, too similar, competing in the same space.
gerson.kurz at t-online.de
Sat Dec 29 10:44:35 EST 2001
On Thu, 27 Dec 2001 22:56:29 GMT, Ron Stephens <rdsteph at earthlink.net>
>I feel that Ruby is so similar in design, purpose, and objectives to
>Python, that it competes directly with Python for developers' mind share.
Here are some comments on the "Features of Ruby", as advertised on
> Ruby has simple syntax, partially inspired by Eiffel and Ada.
I would consider neither Eiffel nor Ada having a inspiring and simple
syntax. Eiffel is for business people who have outgrown COBOL. I think
the Python syntax is by far the cleanest syntax I've seen; and that
Ruby has *a lot* of perlisms in it.
> Ruby has exception handling features, like Java or
> Python, to make it easy to handle errors.
Call me oldfashioned, but I don't like exception handling - I like
if-then-else and error checking style. Exception handling is cool for
exceptions - that is: *unlikely* situations -, but it is not cool for
something as commonplace as open() failing because the file doesn't
> Ruby's operators are syntax sugar for the
> methods. You can redefine them easily.
There was once an aprils-fool joke called "Generalizing Overloading
for C++ 2000" (See http://www.research.att.com/~bs/whitespace98.pdf).
So much for the need to redefine operators.
> Ruby is a complete, full, pure object oriented
> language: OOL. This means all data in Ruby is
> an object, not in the sense of Python or Perl,
> but in the sense of Smalltalk: no exceptions.
> Example: In Ruby, the number 1 is an instance
> of class Fixnum.
I've always found it terrible that languages try to *force* a paradigm
onto your code. As wittness java: isn't it a joke that "everything has
to be a class" and then they introduce static member functions just to
get a main()? I like pythons pragmatic approach *much* better: You can
do OOP where you need it, and use other things when you feel like it.
> Ruby features single inheritance only, *on purpose*.
> But Ruby knows the concept of modules (called
> Categories in Objective-C). Modules are collections
> of methods. Every class can import a module and so
> gets all its methods for free. Some of us think that
> this is a much clearer way than multiple inheritance,
> which is complex, and not used very often compared with
> single inheritance (don't count C++ here, as it has
> often no other choice due to strong type checking!).
That reminds me of how the book "Inside OLE2" advertises COMs
non-support for multiple inheritance with the argument "you don't need
it to do OOP", while really its just forcing you to use more complex
design when simple multiple inheritance would do. I also like the way
python features add-in classes.
========= WAS CANCELLED BY =======:
From: gerson.kurz at t-online.de (Gerson Kurz)
Subject: cmsg cancel <3c2de385.9780406 at news.t-online.de>
Control: cancel <3c2de385.9780406 at news.t-online.de>
Date: Mon, 31 Dec 2001 03:08:17 GMT
Organization: A poorly-installed InterNetNews site
Message-ID: <cancel.3c2de385.9780406 at news.t-online.de>
X-Trace: news2.kornet.net 1009774696 27193 22.214.171.124 (31 Dec 2001 04:58:16 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:58:16 +0000 (UTC)
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)
This message was cancelled from within Mozilla.
More information about the Python-list