[AccessD] explicit type

Charlotte Foust cfoust at infostatsystems.com
Thu Oct 2 11:36:49 CDT 2003


I agree on the speed issue and variants, but we are talking about
constants, not variables, and constants are not dynamic.  Since the
programmer has to populate the constant and logically does so when
he/she creates the thing, is it really likely they will assign the wrong
kind of data to it?

Charlotte Foust

-----Original Message-----
From: John Colby [mailto:jcolby at colbyconsulting.com] 
Sent: Thursday, October 02, 2003 8:11 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] explicit type


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

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list