Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby and Python, questions (not a flamewar!)

Thread Tools

Ruby and Python, questions (not a flamewar!)

Damian Terentyev
Posts: n/a
Good day!
First, let me apologise for some Japanese nationalism and Ruby=20
fanaticism, and do not be offended if I say something inappropriate.

On Jan 20, 2007, at 05:21, Tom Pollard wrote:
> Well, Ruby was written by a /person/, not a culture, and it's largely=20=

> a tasteful amalgam of good ideas introduced in those old "Western"=20
> languages. I'd be interested to hear what you (or anyone else) thinks=20=

> is distinctively non-Western about Ruby, as opposed to C or Lisp or=20
> Smalltalk.

It is worth noting that a person who created Ruby have originated from=20=

a distinct (Japanese) culture. And one of the key characteristics of=20
Japanese culture is its openness for adoption of other cultures. Many=20
great pieces of Japanese culture were taken from others and then=20
transformed by adding subtle differences, thus making them (IMHO)=20
perfect. Think about Zen Buddhism (a philosophy that came from China),=20=

or quality control (curiously, an American idea that originally didn't=20=

get support in the US and had to be adopted later from Japanese) =E2=80=94=
trend is obvious.
And I don't think it would be an exaggeration to see something similar=20=

in Ruby design. All Ruby's features were widely known and used in a=20
whole bunch of high-level languages, but it took a Japanese to unite=20
them together in such subtly unique way that was Ruby, and the result=20
was a (IMHO) perfect language.
Python has similar capabilities (and is even a little more advanced if=20=

we speak about Unicode support, and more mature if we speak about many=20=

third-party libraries available), but it doesn't make programming fun=20
as Ruby claims, and in fact, does. It is those small subtleties that=20
make this possible. The ability to write [1,2,3].length and=20
[1,2,3].size as it pleases you, those funny blocks instead of dull=20
for-loops or clumsy lambdas, optional use of parentheses =E2=80=94=C2=A0al=
l this=20
makes writing programs more natural and pleasant.

1. print is a statement in Python 2 and I can imagine no programmer who=20=

deliberately chooses to write print("boo") instead of just print "boo".=20=

And in Python 3 it's going to become a function so that only the former=20=

syntax will be correct. They say, to make it more readable. I don't=20
think lots of parentheses and brackets improve readability.
2. indentation eliminates multiple "end" clauses but makes pure python=20=

virtually unacceptable for use as a templating language. And again, I'm=20=

not sure that

if boo:

is more readable than simple "doo if boo"
3. can't understand why only in recent 2.5 Python became to agree with=20=

both "except" and "finally" clauses in exception handling.

These are the examples of constraints that Python puts on programmer's=20=

mind. They are not severe, but a creative mind searching for a solution=20=

doesn't want any limits at all! Ruby really gets out of your way when=20
you create programs. And maybe it is that freedom that makes=20
programming Ruby fun. And that's why there couldn't exist such thing as=20=

Python on Rails. Ruby attracts programmers that want to freely=20
experience their thoughts and have fun =E2=80=94 and this is why it =
yields such=20
original and convenient products.

An answer to the OP's questions =E2=80=94 why Ruby is not as wide-spread =
Python =E2=80=94 lies in two domains:

1. Aforementioned language barrier and Ruby's youn age in general.

2. Ruby's flexible syntax gives too much freedom =E2=80=94 and this may =
away some less creative programmers that need something solid under=20
their feet. When you first com to Ruby you may become overwhelmed with=20=

all that freedom and panic

Thanks for your attention.

Your sincerely,
Damian/Three-eyed Fish=

Reply With Quote
Posts: n/a

Drew Olson wrote:

> I've been using ruby for the past 6 months and I must say I am extremely
> impressed. I find it a joy to write and I even find myself making
> excuses to throw together simple scripts at work. I'm also teaching
> myself rails and enjoying the experience as well.
> At the same time, I'm looking at Python because I think it's also an
> important language to know/understand today. However, the more I look at
> Python the more I am convinced that ruby is just better. Syntax-wise,
> language vision, design philosophy, I like them all from the ruby side
> better.
> So, I am kind of confused as to why Python is so mainstream and ruby
> still seems so fringe. Apps like YouTube are written in Python and
> powerful organizations like NASA, Google, etc. are using Python as well.
> So basically, here are my questions:

Hi Drew,
Maybe your confusion on Python''s status is linked to your belief that
because Ruby is 'better' for you then it must be better than Python for

- Paddy - A Pythonista who learned Python before Ruby, has seen no
compelling reason to switch, and would be more interested in getting
Python/Perl/Ruby/TCL/C#/Java to more seamlessly interoperate. Easy
access to modules written in any script, Yea!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby extension (C++) on OS X [ruby 1.8.2] and Google-Sketchup [ruby 1.8.5] Nicholas Ruby 3 01-28-2007 01:48 AM
The Ruby Edge - Digg for Ruby and Ruby On Rails roschler Ruby 0 10-15-2006 11:35 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
Questions about SWIG, Ruby/DL and embedding calls to ruby withinC++ Code Charles Comstock Ruby 1 06-25-2004 09:49 PM
Re: Questions....questions....questions Patrick Michael A+ Certification 0 06-16-2004 04:53 PM