It's about more than just the return type.

For instance, this is perfectly valid in cf:

<cfset myQuery = QueryNew("columns go here")>
<cfset myQuery = "Woohoo!  This used to be a query - now it's a string!">

That's all because of loose typing.  In fact, in CF, you can do this:

<cfset myQuery = QueryNew("column1")>
<cfset myQuery = "Woohoo!  This used to be a query - now it's a string!">

<cfoutput query="myQuery">
        #column1#
</cfoutput>

And CF won't complain about it until runtime because it does no compile time
check on the variable types.  In a strongly typed language, you'd get a
compile error when you tried to assign a string to a query object.

You also would no longer need hacks like JavaCast() to pass strongly-typed
variables into java calls.

Roland


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Patrick McElhaney
Sent: Thursday, April 06, 2006 6:26 PM
To: [email protected]
Subject: Re: [CFCDev] Mixins vs. Interfaces

On 4/6/06, Roland Collins <[EMAIL PROTECTED]> wrote:
> It should be a page-level or function-level directive.
>
> <cfsettting strongtyping="true">
>

Isn't it already a function-level directive? You can set
returntype="any" on cffunction and type="any" on cfargument.

Can you give me a concrete example of what would be different when
strongstyping is set to true?

Patrick
--
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to