Re: How's ruby compare to it older brother python

From: Phil Tomson (ptkwt_at_aracnet.com)
Date: 04/26/04


Date: 26 Apr 2004 17:17:24 GMT

In article <108pvmgl0h7m3ea@news.supernews.com>,
John Roth <newsgroups@jhrothjr.com> wrote:
>
>"Hunn E. Balsiche" <hunnebal@yahoo.com> wrote in message
>news:c6ich0$c5mee$1@ID-205437.news.uni-berlin.de...
>> in term of its OO features, syntax consistencies, ease of use, and their
>> development progress. I have not use python but heard about it quite
>often;
>> and ruby, is it mature enough to be use for developing serious
>application,
>> e.g web application as it has not many features in it yet.
>
>As another poster has mentioned, Ruby is more closely related
>to Perl than to Python. While I don't use it, people I respect who
>have moved to Ruby say it has a couple of real killer features;
>in particular the way blocks and the pervasive use of the visitor
>pattern come together change the way one writes programs for
>the better.
>
>As far as syntax is concerned, there doesn't seem to be a
>huge amount of difference. Syntax is syntax, and every language
>has it's little pecularities.

Well, there is one big difference syntactically: Python uses indentation
as syntax and Ruby doesn't. Personally I don't prefer Python's
'indentation-as-syntax' since it means that syntactically significant
pieces of my code are invisible and if the tab settings in my editor are
not the same as yours it can make it difficult to share code (or even
worse, it might look like everything is OK when we share code, but the
code which looks exactly the same to each of us, might not be depending
on how tabs are or are not expanded). It would also seem to be a pain for
cutting & pasting code as well.
However, some people really like Python's indentation-as-syntax, so YMMV.

Your best bet is to actually use each language for a small project
so that you spend about a day with each language. You'll find that while
on the surface both languages seem quite similar, at a deeper level they
each have a very different effect on how you think about and approach the
problem. Some people find that Ruby best fits with their brain and others find
Python a better fit. You won't know until you try.

Phil



Relevant Pages

  • Re: Why not adopt "Python Style" indentation for Ruby?
    ... *language* features where Python leads Ruby.) ... When you come right down to it, there are only a few basic syntax styles that have survived the test of time. ... I suppose assembly language syntax has also survived, and FORTRAN and COBOL, but I don't think anyone would design a new language with those. ...
    (comp.lang.ruby)
  • Re: Seed7 Release 2007-06-07
    ... It turns out ruby actually has a construct similar to "withfile": ... being able to modify the syntax of a language can have ...
    (comp.lang.misc)
  • Re: The Object Pascal Language standard
    ... Oxygene has introduced over current Delphi and FPC. ... A LINQ-like framework and language syntax could be provided by an ... unmanaged Pascal language (with substantial RTL support being required, ... There's nothing ".NET specific" about this (and other features). ...
    (borland.public.delphi.non-technical)
  • Re: Amazing LINQ for .Net
    ... >>> dynamic typing, use a different language. ... why even use types at all, if Ruby apparantly is so great? ... functional programming concepts into OOP. ... C#'s new features that help facilitate a more functional approach as ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Why do some methods names which replace the content in place doesnt have the "!" sign?
    ... } I program in C++ but fail to see how a feature from} a statically typed language would provide any benefit to a dynamic} language such as Ruby. ... I have never wanted for such a feature in Ruby but} I have wanted features from Ruby in other languages. ... There are many valuable features that are orthogonal to whether typing is ...
    (comp.lang.ruby)