Jump to content

  • Log In with Google      Sign In   
  • Create Account


Python vs. Ruby


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Andrew Nguyen   Members   -  Reputation: 150

Like
Likes
Like

Posted 31 December 2001 - 08:26 AM

Python vs. Ruby I was just wondering, what scripting language got''s what it takes to become a mainstream language (and possibally machine compiled)?

Sponsor:

#2 Oluseyi   Staff Emeritus   -  Reputation: 1670

Like
Likes
Like

Posted 31 December 2001 - 08:40 AM

Ruby.

As with all opinions, I''m largely prejudiced in favor of my choice due to its syntactic similarity to languages I already use and like (particularly C++). I dislike any language that imposes a typographic style, and many other programmers do too (it''s one of those religious issues).

However, Ruby has certain features that many find irritating, and still lacks decent English language documentation. It also doesn''t have the support and popularity of Python (largely for the same reason). And we all know that best design doesn''t always win *cough* Windows *cough*

As always, in the final analysis the answer is "Pick One." It hardly matters.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!


#3 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 31 December 2001 - 02:42 PM

Bruce Eckel has some thoughts on the issue: http://www.mindview.net/Etc/FAQ.html#Ruby.

As for Python enforcing a typographic style - When you don''t have any block delimiters, theres pretty much only one way of indenting anyway. Most of the religious discussions are about where to put the block delimiter.

(I don''t know much about Ruby, so I dont necessarily agree with Eckel''s opinions)

Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey

#4 Oluseyi   Staff Emeritus   -  Reputation: 1670

Like
Likes
Like

Posted 31 December 2001 - 02:54 PM

quote:
Original post by Arild Fines
As for Python enforcing a typographic style - When you don''t have any block delimiters, theres pretty much only one way of indenting anyway.

Precisely. We (the anti-indentation zealots) resent the lack of block delimiters and consider it an exercise in absolute idiocy per language design.

Oh, it may make things all nice and neat, but it forces severely nested loops with long statements to trail off the end of the page - ugly to read, ugly to print. It feels like a throwback to FORTRAN''s 80-character limit, with statements beginning in column 13, etc. Or Visual Basic *ducks ensuing flamewar*

Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing or choosing Perl over Python or Ruby or even the mythical Perl-Python hybrid, Parrot) require unanimity of belief. And so forth.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!


#5 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 01 January 2002 - 04:00 AM

I still dont get it. You say that you prefer not to use indentation at all? Eg you nest like this:
  
if ( bleh )
{
if( blah )
{
for(int i = 0; i < blogh; i++)
blaghBlagh();
}
else
{
bleahBlagh();
}
}


quote:

it forces severely nested loops with long statements to trail off the end of the page

Dont see that one either - Python only enforces that indentation of a nested block must be more indented than the containing block, and that indentation within a single block must be consisten. Eg, you can have a nested block indented by a single space if you absolutely want to.
Python also does have several language constructs that makes heavy nesting(a Bad Thing) easy to avoid(list comprehensions, lambda functions etc...)

(Note that I'm not arguing the merits of Ruby vs Python here - as I stated earlier I know next to nothing about Ruby and while slagging/praising things one doesnt know seems to be a popular pasttime on these forums, its not something I participate in.)



Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey

Edited by - Arild Fines on January 1, 2002 12:56:58 PM

#6 Shannon Barber   Moderators   -  Reputation: 1373

Like
Likes
Like

Posted 01 January 2002 - 08:47 AM

quote:
Original post by Oluseyi
Oh, it may make things all nice and neat, but it forces severely nested loops with long statements to trail off the end of the page - ugly to read, ugly to print. It feels like a throwback to FORTRAN''s 80-character limit, with statements beginning in column 13, etc. Or Visual Basic *ducks ensuing flamewar*


You know the counter-arguement is that any code that runs off page due to indentation is $&!# and needs to be refactored anyway
It is annoying to have the IDE enforce a look to the code though.

quote:

I was just wondering, what scripting language got''s what it takes to become a mainstream language (and possibally machine compiled)?


Both are fairly popular for such new languages, though I think Python has the lead. JIT is probably in thier future rather than static compilation.

#7 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 01 January 2002 - 10:35 AM

Python''s been around for at least 10 years - its hardly a new language.

Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey

#8 Oluseyi   Staff Emeritus   -  Reputation: 1670

Like
Likes
Like

Posted 01 January 2002 - 12:07 PM

quote:
Original post by Arild Fines
I still dont get it. You say that you prefer not to use indentation at all?

No, I prefer to use indentation if and when I feel like it.

quote:
Python also does have several language constructs that makes heavy nesting(a Bad Thing) easy to avoid(list comprehensions, lambda functions etc...)

Just as you are not arguing the merits of Python over Ruby, neither am I arguing the merits of any other language over Python. I''m just nitpicking.

Magmai: I hear you.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS