Need a compelling argument to use Django instead of Rails

Jean-Paul Calderone exarkun at divmod.com
Wed Jul 26 11:29:34 EDT 2006


On 26 Jul 2006 08:16:21 -0700, aaronwmail-usenet at yahoo.com wrote:
>
>Jaroslaw Zabiello wrote:
>> On Wed, 26 Jul 2006 16:25:48 +0200, Bruno Desthuilliers wrote:
>>
>> > I have difficulty imagining how a language could be more dynamic than
>> > Python...
>>
>> E.g. try to extends or redefine builtin Python classes on fly. Ruby is so
>> flexible that it can be used to create Domain-specific Programming
>> Languages.
>
>This, of course, is really cool if you are working
>all by yourself on a dissertation or something,
>but can be completely disasterous if you are
>actually working with other people who need to
>know what the expressions of the programming
>language mean and do.  Back in the day every
>good Common Lisp programmer wrote in a
>dialect completely incomprehensible to any other
>Common Lisp programmer.  Kinda fun, but not
>"best practice."
>   -- Aaron Watters
>

I think this is exactly correct.  However, note that Python does not
necessarily really have this limitation.  _CPython_ may prevent you
from changing the behavior of builtins, but that doesn't mean all
Python implementations do (in fact, even CPython used to let you add,
remove, or change the implementation of methods on builtin types).

For example:

    exarkun at charm:~/Projects/pypy/trunk$ pypy/bin/py.py 
    PyPy 0.9.0 in StdObjSpace on top of Python 2.4.3 (startuptime: 1.83 secs)
    >>>> list.append = lambda self, value: 'hello, world'
    >>>> x = []
    >>>> x.append(10)
    'hello, world'
    >>>> x
    []
    >>>> 

As alternate implementations become more widely used, it will be important
to nail down exactly which behaviors are implementation details and which
are language features.  Right now the line is pretty fuzzy in many cases.

Jean-Paul



More information about the Python-list mailing list