[python-advocacy] Python vs Ruby on Apple site
Bjørn Stabell
bjorn at stabell.org
Thu Nov 29 04:20:22 CET 2007
On Nov 28, 2007, at 14:25, Ronald Oussoren wrote:
>> I've also cc'd Ronald Oussoren, who is probably the best bridge
>> between the Python community and Apple (being the person who did
>> all the work:-), and I'd also like to know whether he sees any bias
>> here,
>
> I don't see any bias there, the article seems carefully balanced.
>
> BTW. the best way to get more documentation is writing it. That's
> one thing the Ruby folks have gotten right and we haven't: a nice
> website with current information.
Lack of documentation used to be Ruby and Rails's biggest weakness.
Glad to hear it's changed.
Here are some of the issues I have with the article. I'm not a
language expert, so perhaps someone could correct me on the points I'm
wrong.
[ What Are Ruby and Python? ]
> [ ... ]
>
> Although their similarities are striking, these scripting languages
> do have some differences. While Python code can contain both objects
> and built-in types, in Ruby everything is an object. There are no
> primitive or built-in types, such as integers. Thus anything in Ruby
> code can accept messages.
>
I thought the type/class unification in 2.2 did away with the big
"built in types" issue?
> And you don’t have to declare variables to be of specific object
> types.
>
I don't think you have to do this with Python, or any other
dynamically types language either?
> To distinguish variables as global, local, instance, and class, Ruby
> uses naming conventions.
>
(... like Perl, whereas Python has other scoping rules.)
> Ruby also has mix-in by modules and blocks, language features absent
> in Python.
>
... but alas no mention of the features Python has that are missing
from Ruby, e.g., generator expressions.
I guess the biggest difference is in the way Python uses indentation
for scoping, whereas Ruby uses begin/end or {}.
[ The Standard Ruby Package + Standard Python Package ]
The Python packages that are included (except for numpy) are Mac or
PyObjC packages. The Ruby list is more complete with web framework
packages and their dependents. I can understand this is a marketing
issue (it's nice to bundle Rails and all) but it just makes Python
look like it can't be used for web development. I guess it could be
good to mention Zope, Plone, TurboGears/Pylons, and Django as
alternatives.
NumPy's description might be better updated to "scientific computing:
N-dimensional arrays, linear algebra, Fourier transforms, integration
with Fortran" or just "scientific computing libraries". Just saying
"Array processing for numbers, strings, records, and objects" doesn't
do it justice.
[ RubyOSA vs py-appscript ]
I'm sure it's true that RubyOSA is more complete than py-appscript,
and this kind-of shines through with a more colorful language and
additional examples missing from py-appscript. At least, perhaps the
py-appscript section could get an example too, similar to the
"elegant" RubyOSA one :)
Rgds,
Bjorn
More information about the Advocacy
mailing list