Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] ruby and python in Japan
- Date: Mon, 26 Feb 2007 12:00:28 +0900
- From: "Zev Blut" <zb@??>
- Subject: Re: [tlug] ruby and python in Japan
- References: <45E16CA8.2010909@example.com> <20070225122334.GA10626@example.com> <87r6sdk5o7.fsf@example.com>
- Organization: Ubiquitous Business Technology, Inc.
- User-agent: Opera Mail/9.02 (Linux)
On Mon, 26 Feb 2007 11:34:48 +0900, Stephen J. Turnbull <turnbull@??> wrote:
Dave Brown writes:
> Actually, however, Django isn't bad. Its biggest flaws come from the > restrictiveness of the way that Python does things
What do you find restrictive about the way that Python does things?
Well, this is not restrictive but an annoying aspect is that you must explicitly declare self in all of your instance methods. It makes the OO aspect of Python feel tacked on.
> treating Python as if it were Ruby takes a bit of work--for instance,
> you can't casually reopen a previously-defined class and change it like
> you can with Ruby).
I've always considered that a feature, not a bug; that's what derived classes are for.
What's the use-case for changing a class on the fly?
In most cases it is not a good thing, but there are times when it can be very useful. For example, if a standard API is broken you can simply open the class (such as cgi) and redefine a working method. Then, while you are waiting for the fixed patch to be accepted into ruby core you can keep using your monkey patch. This is important if you are distributing an app or framework and your clients do not have root access to explicitly patch the broken file. Also, Rails does some fun stuff with dates and numbers such as "5.days_from_now".
Zev
- Follow-Ups:
- Re: [tlug] ruby and python in Japan
- From: Stephen J. Turnbull
- References:
- [tlug] ruby and python in Japan
- From: Micheal Cooper
- Re: [tlug] ruby and python in Japan
- From: Dave Brown
- Re: [tlug] ruby and python in Japan
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] A Ruby question
- Next by Date: Re: [tlug] ruby and python in Japan
- Previous by thread: Re: [tlug] ruby and python in Japan
- Next by thread: Re: [tlug] ruby and python in Japan
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links