Hi CF Community,
I’d like to get your opinions. Would you prefer CF’s member functions to be type-specific or type-casting? Currently they are type-specific.
These work:
-
myString.dateTimeMemberFunction()
- myString.numericMemberFunction()
- myNumber.stringMemberFunction()
- myXMLAttribute.structMemberFunction()
- myXMLNode.arrayMemberFunction()
These fail:
- myDateTime.stringMemberFunction()
- myDateTime.numericMemberFunction()
- myNumber.dateTimeMemberFunction()
If they were Type-Casting, then “stringy” member functions would work on any simple variable just as their BIF counterparts do.
Related ticket: https://tracker.adobe.com/#/view/CF-4187503
Please add your comments here and/or on that ticket. Please vote your opinion.
Thanks!,
-Aaron
The post Type-Specific vs Type-Casting member functions appeared first on ColdFusion.