[Zope3-dev] Schema Field Names

Martijn Faassen faassen@vet.uu.nl
Sun, 14 Jul 2002 23:37:06 +0200


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?

> 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.

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.

Link at the bottom:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SchemaProposal

Regards,

Martijn