[Python-Dev] Re: Adding Optik to the standard library

Greg Ewing greg@cosc.canterbury.ac.nz
Tue, 04 Jun 2002 12:19:37 +1200 (NZST)


barry@zope.com (Barry A. Warsaw):

> I'm probably somewhat influenced too by
> my early C++ days when we adopted a one class per .h file (and one
> class implementation per .cc file).  IIRC, Objective-C also encouraged
> this granularity of organization.

Deciding how to split things up into files is not such
a big issue in C-related languages, because file
organisation is not tied to naming. You can change
your mind about it without having to change any of
the code which refers to the affected items.

In Python, one is encouraged to put more thought into
the matter, because it affects how things are named.
One-class-per-module is convenient for editing, but
it introduces an extra unneeded level into the
naming hierarchy.

It's unfortunate that editing convenience and naming
convenience seem to be in conflict in Python. Maybe
a folding editor is the answer...

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+