[Python-Dev] User's complaints

Bob Ippolito bob at redivi.com
Thu Jul 13 18:49:31 CEST 2006


On Jul 13, 2006, at 5:02 AM, Jeroen Ruigrok van der Werven wrote:

> Hi Bob,
>
> On 7/13/06, Bob Ippolito <bob at redivi.com> wrote:
>> Adding open classes would make it easier to develop DSLs, but you'd
>> only be able to reasonably do one per interpreter (unless you mangled
>> the class in a "with" block or something).
>
> The person whose 'complaints' I was stating says that DSLs (Domain
> Specific Languages for those who, like me, were confused about the
> acronym) are a big part of what he is after and one per interpreter is
> fine by him. He also realises that the application(s) he needs them
> for might be unusual. He doesn't specifically need the builtin types
> to be extendable. It's just nice to be able to define a single class
> in multiple modules. Even C++ allows this to some extent (but not as
> much as he'd like).
>
> He understands the implications of allowing open classes (import vs.
> no import changes semantics, etc.). Personally, he doesn't care *too*
> much about newbie safety since he's not a newbie. To quote verbatim:
> "give me the big guns :-)"
>
> And while we're at it, he also stated: "[...] add multiple dispatch to
> your list of improvements for Python".
>
> I hope this clarifies it a bit for other people.

Well, if this person really weren't a newbie then of course they'd  
know how to define a metaclass that can be used to extend a (non- 
built-in) class from another module. They'd probably also know of two  
or three different implementations of multiple dispatch (or  
equivalent, such as generic functions) available, and could probably  
write their own if they had to ;)

The only valid complaint, really, is that built-in classes are read- 
only. I doubt anyone wants to change that. If they want to write  
things in the style of Ruby, why not just use it?

-bob



More information about the Python-Dev mailing list