1. It's going to reside in memory one way or the other. Either one copy as an 
Application variable or one copy for each page request currently executing as a 
"variable" variable or a request variable. This isn't idle curiosity for me, I am 
doing this on a site that has almost a thousand "constants" each page needs.

2. Point taken. So it would work BUT it's bad practice.

At 03:08 PM 8/30/00 -0400, Dave Watts wrote:
>> Why wouldn't he put it in an Application variable? If it's 
>> the same for everyone that would make the most sense to me.
>> <!--- Application.cfm --->
>> <cflock scope="application" timeout="30" type="exclusive">
>>   <cfif NOT IsDefined("application.ds")>
>>     <cfset Application.ds = "mydatasource">
>>    </cfif>
>> </cflock>
>> 
>> If you never EVER EVER set it anywhere else, you shouldn't 
>> need to lock it for reads, would you?
>
>Two points.
>
>1. If the variable's never going to change, why make it reside in memory?
>The cost of creating and destroying a local or Request scoped variable is
>infinitesimal.
>
>2. If I never EVER EVER did anything I shouldn't, I'd be a much better
>person. Application development shouldn't rely on the good graces of
>individual programmers, wherever it's possible not to. If you create a
>memory variable, you should assume that someone else, writing some other
>script or maintaining your script after you've moved to other things, will
>do the wrong thing.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>voice: (202) 797-5496
>fax: (202) 797-5444 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to