Quantcast
Channel: Member Functions – ColdFusion
Viewing all articles
Browse latest Browse all 2

Type-Specific vs Type-Casting member functions

$
0
0

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:

  1. myString.dateTimeMemberFunction()

  2. myString.numericMemberFunction()
  3. myNumber.stringMemberFunction()
  4. myXMLAttribute.structMemberFunction()
  5. myXMLNode.arrayMemberFunction()

These fail:

  1. myDateTime.stringMemberFunction()
  2. myDateTime.numericMemberFunction()
  3. 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.


Viewing all articles
Browse latest Browse all 2

Trending Articles