Nolan, thanks for posting the comparison! I also have Python, but as my
background is more in the C languages, I haven't investigated it yet...
For those interested, here is similar code in C#...
You'll notice that the code for the Greet method is defined within the
braces, rather than the indentation idea, as in Python...
public string Greet(string person)
{
if(person == "Cara")
Console.WriteLine("Hey you!");
else
Console.WriteLine("Hello " + person + "!");
}
Smiles,
Cara
At 02:38 AM 1/15/2007 -0600, you wrote:
>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.
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.410 / Virus Database: 268.16.10/625 - Release Date: 1/13/2007
---
View my on-line portfolio at:
http://www.onemodelplace.com/CaraQuinn
"The only things I really think are important, are love, and each
other. -Then, anything is possible..."
http://home.earthlink.net/~cara-quinn
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.10/625 - Release Date: 1/13/2007
_______________________________________________
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.