I gotta admit that this issue is bugging me too.  Larry mentions (in
<http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.LNX.4.44.0210140927520.20533-100000%40london.wall.org>)
that all-uppercase is "ugly" and has "boundary conditions".
Maybe it would be helpful to know what conditions are causing problems.

All-lowercase implies that we want them to be used *more* than the object
types.  But it seems like we should encourage the use of the object types.
Maybe that's because we want to discourage undef values, but I've been
programming databases too long, so I like undefs now.

We certainly don't want to discourage using the autopromoting Int -> Long
-> Bignum features of the object types, do we?

Also the typecasting functions have been defined in all lower case, which
would suggest to the naive user that they will typecast to primitive
types, and perhaps even throw an exception when an undef is cast.


On Wed, 6 Nov 2002, Michael Lazzaro wrote:
> David Whipp wrote:
> > Dan Sugalski [mailto:dan@;sidhe.org] wrote:
> > > At 6:50 PM -0800 11/6/02, David Whipp wrote:
> > > > Whenever a value passes through a primitive type, it
> > > > loses all its run-time properties; and superpositions
> > > > will collapse.
> > >
> > > What makes you think so, and are you really sure?
>
> > If I am wrong, then I am in need of enlightenment. What
> > is the difference between the primitive types and their
> > heavyweight partners? And which should I use in a typical
> > script?
>
> It has been stated multiple times that primitive types can't take
> runtime properties or other "object-like" features, so that they may be
> as lightweight as possible -- flyweight classes, as it were.
>
> Primitive types were originally intended for runtime speed, thus an
> "int" or a "bit" is as small as possible, and not a lot of weird runtime
> checking has to take place that would slow it down.

I don't think the point is to store them as "small" as possible, but as
"efficiently"  as possible.  That is, in whatever register size the
hardware works best on.  We don't want to compact unrelated bits into
a single hardware address, because then we are forced to do extra masking
and shifting everytime we want to use the value.

~ John Williams


Reply via email to