Sean

I was not suggesting that CFMX try to track an variable to determine  
its type.

Rather I suggest that CFMX allow us to tell it a variable's type  
(optionally) so that it can use that to generate efficient code,

How hard can it be -- even VBS and JavaScript can do it?

Sure, if you don't do things right the code will break -- but the user  
who wants efficiency takes on additional responsibility. -- makes  
development/debugging somewhat more difficult (but less difficult than  
dropping down to Java).

You wouldn't do it everywhere in a program -- just where it makes sense.

Again, I say we are told to lock and scope for best practices -- why  
cant we type where it counts?

Dick

On Tuesday, September 17, 2002, at 08:00 PM, Sean A Corfield wrote:

> On Tuesday, September 17, 2002, at 09:06 , Dick Applebaum wrote:
>>        for
>> (X.set(((java.lang.Object)("1")));_compare(this._autoscalarize(X),1000 
>> 00
>> 0.0)<=0;X.set(coldfusion.runtime.Cast._Object((coldfusion.runtime.Cast 
>> ._
>> double(this._autoscalarize(X)))+(1.0)))){{
>
> Note the assumption that all numbers in CF are (potentially) floating
> point! CF doesn't have a built-in 'int' type so there is no way to tell
> the compiler not to do the more complicated stuff... except... well...
> many years ago (when I was working in the compiler industry) I worked  
> on a
> deep-flow code analyzer that could track values (and types) and make
> optimizations based on what it found... That sort of analysis *could*
> determine that x and loops were set to integers and adjust the code
> accordingly... however, it would need to introduce alias variables (of
> type 'int') that shadowed the real values and then determine that it  
> could
> hoist the real/shadow synchronization out of the loop. This sort of  
> stuff
> is *hard*... You have to consider 'threats' to variables that are being
> shadowed (i.e., anything that could change their value that isn't part  
> of
> the mainline code, e.g., a function call - which could set caller.x =  
> 123.
> 45).
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to