On Jan 15, 2007, at 2:09 AM, Ken the Crazy wrote:
> Which of these languages is easiest to learn, python or ruby, which
> is less
> verbose, and which is more powerful?
Those are difficult questions to answer and, for the most part, there
aren't any. Neither is more powerful, I'd say. Python's Pygame is
probably one of the more actively-developed game libraries, but
Rubygame/RUDL are certainly worthy contenders.
My personal preference is Ruby. Python is more concise in that it
uses indentation for determining whether code is in any given method/
block (I.e. code indented by X spaces is in the same block) but not
all screen readers speak indentation (VoiceOver doesn't.) Ruby uses
"end" to end blocks, and I find:
def greet(person)
if person == "Nolan"
puts "Hey, you!"
else
puts "Hello, #{person.capitalize}."
end
end
a bit easier to parse than:
def greet(person):
if person == "Nolan":
print "Hey you!"
else:
print "Hello, "+person+"."
It isn't as big of an issue in this instance, but it wouldn't be
immediately obvious where blocks ended without speaking of
indentation levels, and the "end" tokens make that a bit more easy to
spot, as it were.
Ruby has a number of advanced features that I really like, but those
wouldn't be of interest to someone just starting out. In summary, you
won't go wrong either way, but I myself prefer Ruby. Check them both
out. They're free, available on just about every platform and each
have great tutorials. Ruby even has the first version of the pickaxe,
the book long held to be its definitive reference, available online.
It takes you through lots of the basics rather quickly but doesn't
skimp on the advanced topics, either. Check out:
http://rubycentral.com/book/
_______________________________________________
Gamers mailing list .. [email protected]
To unsubscribe send E-mail to [EMAIL PROTECTED] You can visit
http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
any subscription changes via the web.