Saturday, May 12, 2012

ColdFusion From an Outsider's Perspective

After changing my primary development language to PHP over a year ago, I've been able to get a new perspective on ColdFusion. One thing I've noticed is that people in the community spend less time focusing on new language enhancements and instead spend more time trying to make the language easier to work with. While this is a good thing, there are two pain-points that seem to come up over and over again that simply aren't issues in most other languages:
  • Case sensitivity
  • Struct key order
Would it really be so bad if ColdFusion was case sensitive? It would make converting ColdFusion objects to JSON or XML a lot more straightforward. "But Tony, I want to be able to define a function named getName but then be able to call it using gEtNaMe()". There should be no place for inconsistency in code. I honestly don't see any benefits to it not being case sensitive. Besides, with the addition of Hibernate, parts of the language are starting to become case sensitive already.

Would it really be so bad if structs maintained their correct key order? I see people building relatively complex solutions trying to solve this problem, often times having to dip into Java to accomplish the task. Wouldn't it be better if the native data type just worked the way you wanted it to? "But Tony, that's not how a HashMap works." Says who? Object keys stay ordered in JavaScript and associative array keys stay ordered in PHP. ColdFusion should work the same way.

In my opinion, making these changes adds a lot more value to the language than some of the other recent enhancements, such as WebSockets or REST.