Is there a "Large Scale Python Software Design" ?

Alex Martelli aleaxit at
Tue Oct 19 18:01:54 CEST 2004

Stephen Waterbury <golux at> wrote:
> For something as complex as CAD/CAM, you will probably want to
> make maximum use of interfaces and adaptors, with minimal and
> very judicious application of classic inheritance hierarchies.
> I am *not* an expert on interfaces and adapters, but several
> of the gurus on this list are.

Heh -- funny enough, I did develop my ideas on protocol adaptation
mostly while working in the CAD area (as Senior Software Consultant to
what used to be Cad.Lab, and is now Think3, for over 10 years).

Our main implementation language, over time, moved from Fortran to C,
then to C++ -- but we did have our own proprietary scripting language,
and a growing amount of applications' functionality was coded in that
higher-level language.  Interfaces (formalized or not) were of course a
given -- in the last few years I was there (and later when I worked as a
consultant for them), as the firm had moved to Windows as the only
platform for its products, mostly COM interfaces among components
(earlier, we had tried Corba, Java, and less formalized ones).  The
Gof4's Design Patterns, and Lakos' Larce Scale C++ Software Design,
helped us crystallize our ideas and practices when they came out (I
devoured both avidly as soon as I could get my hands on them;-), but we
_had_ mostly gone that way already.  But something was missing, and
Robert Martin's excellent essays (the Dependency Inversion Principle
first and foremost) helped BUT didn't quite solve that something...

Protocol Adaptation can, at least potentially.  Try Eby's PyProtocols
for a taste (I may not agree with every one of Eby's design and
architectural choices, but nevertheless it seems to me that PyProtocols
is, today, the best implementation of Protocol Adaptation ideas).
Unfortunately, _that_ is when our choice of programming languages bit --
none of them, including our proprietary scripting language, had
introspection and dynamism enough to get anywhere near.  Java perhaps
might, with much huffing and puffing, but we had put it aside after
extensive trials: too hard to interface our huge existing base of C++,
and rewriting stuff from C++ to Java would have been a nightmare without
templates (generic programming) in Java at the time -- even quite apart
from performance issues, the productivity gains with Java were not worth
the migration costs (for a single-platform software company, at least;
had we still been striving on multiple platforms, I guess it might have
been different:-).

Python (as Eby's work shows, for example) is fully adequate for Protocol
Adaptation (as, no doubt, would other modern VHLLs!)...


More information about the Python-list mailing list