[Zope] Naming conventions

Ian Bicking ianb at colorstudy.com
Wed Nov 26 12:33:39 EST 2003


On Nov 25, 2003, at 3:45 PM, Jim Penny wrote:
> On Tue, 25 Nov 2003 15:10:17 -0600
> J Cameron Cooper <jccooper at jcameroncooper.com> wrote:
>
>> What do you use? What can you recommend?
>
> Unlike most of the other people here, I do use a naming convention, I
> use_sql, _pt, _py, _dtml as suffixes.  Why?  Well, I spend most of my
> time in a text editor, and there are differences in calling convention
> among the various objects.  I like to use explicit parameterization, 
> and
> find that it helps to get correct parameterization if I know what kind
> of thing I am calling.

This is an issue.  The solution I've come to is to wrap all 
non-Python-Script objects, and outside of the wrappers I call only 
Python Scripts (or the occasional extension method, SQL brains, etc).  
This way you get flexible and expressive calling conventions, without 
being tied to the underlying implementation.  Which is to say, it's 
better to use domain-specific calling conventions (i.e., function 
signatures) and avoid type-specific conventions.

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the Zope mailing list