Sean A Corfield wrote: > On Thursday, September 19, 2002, at 02:37 , Jochem van Dieten wrote: > > Adding types to the language as an aid to the compiler - which is why > we're discussing this -
Not necessarily just as an aid to the compiler. That's why I made the step from discussing ColdFusion to discussing CFML. >>But I have not seen any conclusive arguments that support your point >>that adding the option of strongly typed variables would make CFML an >>entirely different language. > > Perhaps only people with a background in compiler design and code > generation will believe me? Or understand you? > Because it changes the semantic specification of the language at a > fundamental level. There's no other way to explain this. Let's take a > simple example: > > a = x / y; > > Right now, as long as x and y are numeric and y is not eq 0, a will end up > as x divided by y, e.g., x = 10; y = 3; a will be > 3.33333333333333333333333333. > > Now, change x and y to 'int' type variables. Should the expression convert > both to floating point and then perform a floating point division > (yielding 3.33333 again)? Most languages don't behave like that. If x and > y are both 'int' then the division would be an integer division and the > result would be just 3. How should CF behave if both are 'int'? How should > CF behave if only one or the other is 'int'? This needs to be specified. <snip> Sorry I made you type so much, but at least I finally understand why you believe it would be such a big thing for CFML. Yes, you would have to specify and document a lot (which might be a good thing, so people don't have the sudden discovery that CF turns the string "April 2002" in a date). Some behaviour would become more counterintuitive. But only for those that use these typed variables. > [DevCon] > > Sorry... It would be good to chat over a few beers about this sort of > stuff... Maybe on a European DevCon. Jochem ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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

