Confessions of a Python fanboy

Emmanuel Surleau emmanuel.surleau at gmail.com
Fri Jul 31 14:41:12 EDT 2009


On Friday 31 July 2009 18:54:23 Tim Rowe wrote:
> 2009/7/31 Steven D'Aprano <steve at remove-this-cybersource.com.au>:
> > On Thu, 30 Jul 2009 18:47:04 +0100, Tim Rowe wrote:
> >> That and the fact that I couldn't stop laughing for long enough to learn
> >> any more when I read in the Pragmatic Programmer's Guide that "Ruby,
> >> unlike less flexible languages, lets you alter the value of a constant."
> >> Yep, as they say "Bug" = "Undocumented feature"!
> >
> > That's no different from Python's "constant by convention". We don't even
> > get a compiler warning!
>
> We don't actually *declare* that something is constant and then have
> that declaration ignored. Python doesn't lie to us, although (as in
> any language) a programmer might.

You could say that Ruby doesn't either, you just need to read the 
documentation. Ruby's unwritten motto is "flexibility über alles". In this 
regard, it is consistent (1). Not much is really bolted down in Ruby. You get 
encapsulation, but it's so easy to break that it's mostly symbolic. It's a 
language which gives great power to the programmer. Whether Ruby programmers 
handle this power responsibly is another debate.

Cheers,

Emm

(1) I find Ruby to be pretty consistent in general, which is not always the 
case of Python.



More information about the Python-list mailing list