Quote:Original post by Windryder
First and foremost, I demand strong typing for making real games in a language. Python and Ruby are excellent for small, simple games, but the type system makes them much more prone to critical (runtime!) errors.
I object: Python and Ruby are strongly typed. You are confusing "strong vs. weak" with "dynamic vs. static".
Quote:Another thing to consider is OO and encapsulation. While both Ruby and Python are OO languages in a sense, they lack many features that I consider critical.
Ah, yes,
well. :)
Quote:For example, Python's encapsulation is... Well, there really isn't any to speak of. Ruby allows for new methods and data to be added to a class from anywhere,
Python allows this too. The only real difference is that the Python community sort-of-officially discourages it, whereas Ruby has standard frameworks that use it to do wonderous things.
Quote:rendering the encapsulation that actually exists useless against a determined "attack".
Repeat after me:
Encapsulation is not in any way, shape or form a security measure. It cannot protect your code from malicious attack, in any language, because it's only relevant to developers. If you can't trust the people on your own team, you have bigger problems than your choice of language. It is there to prevent people on your team from getting the wrong impression about what's part of the interface to a module or not. But you have documentation for that,
right?Quote:Furthermore, both of these languages are "duck typed"
You're restating yourself, but more accurately this time.
Quote:This discourages the use of inheritance for flexibility
As it should; composition is usually what you want instead.
But more importantly, it enables you to program to an interface and not worry about boilerplate. If Foo and Bar are conceptually Spammable, but get spammed() in completely different ways, is it useful or necessary to have a base Spammable definition (which might not provide any useful shared code) - or even to name the concept?
Quote:and instead encourages its use as a means of code reuse.
Not really. In my experience, "code reuse" is a red herring anyway; the real goal is code
use - i.e. actually calling the functionality you already have rather than rewriting it. There are a zillion ways to do this. Inheritance is rarely the right way, but it's one of the few things it's actually good for. Especially when you have higher-order functions and can therefore customize behaviour with all kinds of neat template-and-hook patterns.
For what it's worth, about the only time I ever (manually) use inheritance in Python at all is when an API tells me it expects me to.
The short version of all that: you don't have to like it, but there are real reasons why others do.
Quote:As for the actual syntax, I agree with Krohm on the use of the '--' operator as comment symbol.
The overall impression of a language's syntax is important, yes. But details like this are getting into bikeshed-colour-choice territory.