Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)
Created: 07/10/2015
Components: Language, Java Integration
Versions: 2016,11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: CF11_Final / 2018.0.0.308164
Priority/Frequency: Trivial / Some users will encounter
Locale/System: English / Mac 10 All
Vote Count: 17
The fact that ColdFusion stores numeric literals as strings and converts them on demand makes Java interop harder than it needs to be because you have to insert casts all over the place. See for example this code:
https://github.com/framework-one/cfmljure/blob/master/index-acf.cfm
and compare to this code:
https://github.com/framework-one/cfmljure/blob/master/index.cfm
In addition to Java interop concerns, storing numeric literals as strings means extra conversions are needed, making numeric operations slower in ColdFusion (than Railo/Lucee, for example, which do store numeric literals as Double).
Proposal: change representation of numeric values to be Double by default and convert to String as needed instead of the other way around.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4019629
External Customer Info:
External Company:
External Customer Name: Sean
External Customer Email:
External Test Config: My Hardware and Environment details: Any. The code linked to above has been tested on ACF11 on both Mac and Windows and the casts cannot be removed.
Attachments:
Comments: