Thinking about it...thinking about it...OK, done. I just committed a change to implement this functionality. A CFC function name can now override a built-in function name. In order to invoke the override--whether public or private--from within the CFC you have to qualify the function name with either "variables." or "this.", otherwise, the built-in function gets invoked.
UDFs that are not within CFCs are still prevented from overriding built-in function names. Vince On Apr 9, 2:30 pm, Sean Corfield <[email protected]> wrote: > > My suggestion - and one I'll try to push through the CFML Advisory > Committee at some point - is for CFML engines to allow CFCs to contain > methods that are named the same as built-in functions - but not allow > UDFs (outside CFCs) to override built-ins. Unqualified calls to > private methods in CFCs would need VARIABLES. to disambiguate them but > calls to public methods would "just work" (because they are > obj.method() already). > > This is the least impactful change. It allows CFC authors to protect > their code from future addition of built-ins - as long as they always > use variables.privateFunc() internally. > > Just an FYI in case the OpenBD team want to start thinking about that... > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View --http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood --~--~---------~--~----~------------~-------~--~----~ Open BlueDragon Public Mailing List http://groups.google.com/group/openbd?hl=en official site @ http://www.openbluedragon.org/ !! save a network - trim replies before posting !! -~----------~----~----~----~------~----~------~--~---
