Well, in a sense.

but what about

methodName(arg1)

where arg1 = any

methodName(arg1,arg2)

where arg1 = any and arg2 = boolean

Still valid....

Believe it or not, I strongly believe coldfusion needs to be more typecast..
And grow up to be more of a great language. it would be so damn nice...



On 5/6/07, Sammy Larbi <[EMAIL PROTECTED]> wrote:

Andrew Scott wrote, On 5/4/2007 7:42 PM:
> There would be no need for "any"....
>
> "any" exists, becaue we can't have 2 methods with different arguments.
>
I think of it the other way around.  We can't have 2 methods with
different arguments /because/ "any" exists.  "Any" exists because we're
using a dynamically typed language.  I kind of like that =).




>
> On 5/5/07, *Sammy Larbi* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Andrew Scott wrote, On 5/4/2007 11:32 AM:
>     > *lol* The same way the underlying technology does it....
>     >
>     But how can you do that when you can pass any type into a method?
>
>     >
>     >
>     > On 5/4/07, *Sammy Larbi* <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>     > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
>     >
>     >     Sorry for the confusion Arron, I meant that question to be
>     more like
>     >     "how would you implement /actual/ method overloading" in CF
>     >     itself. =)
>     >
>     >
>     >     Aaron DC wrote, On 5/4/2007 8:14 AM:
>     >     > I would implement it exactly the same way I did in the code
I
>     >     emailed
>     >     > to the list 1-2 hours ago. With the function I defined,
>     you can call
>     >     > save() like so:
>     >     >
>     >     > save(somestruct)
>     >     > save(somestruct, arg1)
>     >     > save(somestruct, arg1, arg2)
>     >     >
>     >     > save(someobject)
>     >     > save(someobject, arg1)
>     >     > save(someobject, arg1, arg2)
>     >     >
>     >     > If you want to make the arguments required, test for their
>     >     existence
>     >     > and generate an error.
>     >     > Aaron
>     >     >
>     >     > Sammy Larbi wrote:
>     >     >> Aaron DC wrote, On 5/4/2007 7:26 AM:
>     >     >>> If you can simulate it (as in the example I just
>     showed), does it
>     >     >>> really matter if it makes it into CF8?
>     >     >>>
>     >     >>> Aaron
>     >     >>>
>     >     >>> Andrew Scott wrote:
>     >     >>>> +1...
>     >     >>>>
>     >     >>>> I agree, it would so good if we could create methods with
>     >     different
>     >     >>>> arguments. I have flagged this as a wish, so I doubt it
>     will make
>     >     >>>> CF8... But who knows...
>     >     >>>>
>     >     >>
>     >     >> And how would you implement it?  I see three choices:
>     >     >> 1) require named arguments, and distinguish on the name
>     >     >> 2) require typed arguments, and distinguish on the type
>     >     >> 3) keep the option of naming/typing arguments, and only
>     require
>     >     it if
>     >     >> attempting to overload a method (throwing an error if, when
>     >     using the
>     >     >> method, someone forgets to name arguments, if that is
chosen.
>     >     >>
>     >     >> Don't forget, we also have optional arguments, so you can
>     use that
>     >     >> for "overloading" too...
>     >     >>
>     >     >> -Sam
>     >     >>
>     >     >>
>     >     >>
>     >     >> You are subscribed to cfcdev. To unsubscribe, please
>     follow the
>     >     >> instructions at http://www.cfczone.org/listserv.cfm
>     >     >>
>     >     >> CFCDev is supported by:
>     >     >> Katapult Media, Inc.
>     >     >> We are cool code geeks looking for fun projects to rock!
>     >     >> www.katapultmedia.com <http://www.katapultmedia.com>
>     <http://www.katapultmedia.com <http://www.katapultmedia.com>>
>     >     >>
>     >     >> An archive of the CFCDev list is available at
>     >     >> www.mail-archive.com/cfcdev@cfczone.org
>     <http://www.mail-archive.com/cfcdev@cfczone.org>
>     >     <http://www.mail-archive.com/cfcdev@cfczone.org>
>     >     >>
>     >     >>
>     >     >>
>     >     >
>     >     >
>     >     > You are subscribed to cfcdev. To unsubscribe, please
>     follow the
>     >     > instructions at http://www.cfczone.org/listserv.cfm
>     >     >
>     >     > CFCDev is supported by:
>     >     > Katapult Media, Inc.
>     >     > We are cool code geeks looking for fun projects to rock!
>     >     > www.katapultmedia.com <http://www.katapultmedia.com>
>     <http://www.katapultmedia.com>
>     >     >
>     >     > An archive of the CFCDev list is available at
>     >     > www.mail-archive.com/cfcdev@cfczone.org
>     <http://www.mail-archive.com/cfcdev@cfczone.org>
>     >     <http://www.mail-archive.com/cfcdev@cfczone.org>
>     >     >
>     >     >
>     >     >
>     >
>     >
>     >
>     >     You are subscribed to cfcdev. To unsubscribe, please follow
the
>     >     instructions at http://www.cfczone.org/listserv.cfm
>     >
>     >     CFCDev is supported by:
>     >     Katapult Media, Inc.
>     >     We are cool code geeks looking for fun projects to rock!
>     >     www.katapultmedia.com <http://www.katapultmedia.com> <
>     http://www.katapultmedia.com>
>     >
>     >     An archive of the CFCDev list is available at
>     >     www.mail-archive.com/cfcdev@cfczone.org
>     <http://www.mail-archive.com/cfcdev@cfczone.org>
>     >     < http://www.mail-archive.com/cfcdev@cfczone.org>
>     >
>     >
>     >
>     >
>     > --
>     >
>     >
>     >
>     > Senior Coldfusion Developer
>     > Aegeon Pty. Ltd.
>     > www.aegeon.com.au <http://www.aegeon.com.au>
>     <http://www.aegeon.com.au>
>     > Phone: +613  8676 4223
>     > Mobile: 0404 998 273
>     > You are subscribed to cfcdev. To unsubscribe, please follow the
>     > instructions at http://www.cfczone.org/listserv.cfm
>     >
>     > CFCDev is supported by:
>     > Katapult Media, Inc.
>     > We are cool code geeks looking for fun projects to rock!
>     > www.katapultmedia.com <http://www.katapultmedia.com>
>     >
>     > An archive of the CFCDev list is available at
>     > www.mail-archive.com/cfcdev@cfczone.org
>     <http://www.mail-archive.com/cfcdev@cfczone.org>
>
>
>
>     You are subscribed to cfcdev. To unsubscribe, please follow the
>     instructions at http://www.cfczone.org/listserv.cfm
>
>     CFCDev is supported by:
>     Katapult Media, Inc.
>     We are cool code geeks looking for fun projects to rock!
>     www.katapultmedia.com <http://www.katapultmedia.com>
>
>     An archive of the CFCDev list is available at
>     www.mail-archive.com/cfcdev@cfczone.org
>     <http://www.mail-archive.com/cfcdev@cfczone.org>
>
>
>
>
> --
>
>
>
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au <http://www.aegeon.com.au>
> Phone: +613  8676 4223
> Mobile: 0404 998 273
> You are subscribed to cfcdev. To unsubscribe, please follow the
> instructions at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/cfcdev@cfczone.org



You are subscribed to cfcdev. To unsubscribe, please follow the
instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org




--



Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org

Reply via email to