[AccessD] explicit type

John Colby jcolby at colbyconsulting.com
Thu Oct 2 11:11:20 CDT 2003


Charlotte,

>Since constants can't be changed, it doesn't seem terribly wrong to skip
typing them.

One of the reasons for even having typed data is to prevent inadvertently
assigning the data to a variable of the wrong type.  If you don't type a
constant, AFAIK it ends up a variant.  Variants are horribly slow, and can
cause (or allow) coercion to a different data type etc.  By stating that
"this constant is a string", or "this constant is a currency", you prevent
programming bugs creeping in.  And then there is the speed issue of using
variants, memory storage of the variant etc.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Thursday, October 02, 2003 11:48 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] explicit type


I generally type my constants, but I think it is unusual in printed code
for the same reason that error handling is often left out.  Since
constants can't be changed, it doesn't seem terribly wrong to skip
typing them.

Charlotte Foust

-----Original Message-----
From: John B. [mailto:john at winhaven.net]
Sent: Thursday, October 02, 2003 6:51 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] explicit type



More information about the AccessD mailing list