[Zope3-dev] Schema Field Names

kapil thangavelu kthangavelu@earthlink.net
Sun, 14 Jul 2002 16:10:29 -0700


On Sunday 14 July 2002 02:37 pm, you wrote:
> kapil thangavelu wrote:
> > On Sunday 14 July 2002 08:46 am, Martijn Faassen wrote:
> > > Stephan Richter wrote:
> > > > is there already a final decision made to call the basic fields Int,
> > > > Str, Bool and so on? I would like to rename it to Integer, String,
> > > > Boolean ... since it seems more readable to me...
> > >
> > > That seems bad, as Python 2.2 is using int, str, and 2.3 will have
> > > bool. This is why I used those field names.
> >
> > schema fields are not equivalent to python types/factories, naming them
> > the same is just more chance for confusion imo.
> >
> > remembering the motto of europython, 'explicit is better than implicit'
>
> -- except when it's not. Anyway, this has nothing to do with explicitness
> or implicitness. Where in the code is something implicit happening?

this isn't about the implementation code, its about the explicit vs. implicit 
nature of the semantics of two different naming conventions, which will lead, 
imo, to one or the other in code which uses that convention. 

iotw. if use of a field has nothing to do semantically with the use of a 
python type, why are we naming them that way. why not make the field names 
explicit? 

for some reason i picture a telephone call, trying to tell someone to use 
'int'. 

perhaps a vote is in order?

> > how soon we forget :-)
>
> The schema code that Stephan wrote now explicitly checks for these types,
> and the intention from the beginning was to start mapping Python's built-in
> datatypes into the Schema. Stephan and I are both in agreement on that goal
> as far as I'm aware. We need this to support a number of use cases, and
> it's a good place to start. Later on we'll expand to support other types of
> things, of course.

sure.

> Anyway, if we want to drag in implicit versus explicit, I'd say one can
> make a good case here for using the same abbreviated names.
>
> > if the referenced irc log is worthwhile to look at can you make it
> > available on the net, it seems a more scalable information discovery
> > protocol than spamming steve.
>
> It has nothing to do with this particular issue, but I'll paste it into
> the project area.

cool, thanks. 

> http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SchemaProp
>osal

cheers

kapil