Aaron at Welcome to Nerdville has published a rant dismissing ColdFusion as rubbish, full of memory leaks, and states that ColdFusion "has the least consistent syntax of any language I’ve ever used".
Let's take these claims one by one, shall we?
"...has the least consistent syntax of any language I’ve ever used... example: structkeyexists takes the arguments structure followed by key, whereas find takes the arguments substring followed by string. Why couldn’t they have put the thing you’re looking for either first or second in both cases? "
I take it Aaron has never used PHP then, the language with a billion functions served (and counting). Not only does it have the sometimes first, sometimes second issue he discussed, half of the functions are of the form someFunction() (words combined), while the other half are some_function() (words separated with underscore).
I've yet to meet a PHP developer that can work without a function guide at his side.
And actually, the consistency is there if you look for it. In ColdFusion any function like structXXX or listXXX or arrayXXX or queryXXX takes the struct, list, array, or query first. Other functions, like find or left or mid, are derived from standard BASIC and C syntax and used the conventions developers of the day were already familiar with. Once used, they became "frozen", as changing them would break existing code.
But like I said, you have to look for it.
Onward. "The compare and comparenocase functions return some weird comparative result..."
When doing a comparison via a function you have to realize that such an operation gives a multiway result. The two strings are either equal, in which case the result is zero (0), the first string is GREATER than the second (result 1), or the first string is LESS than the second (result -1, or less than 0). If other words, the comparison is more complex than yes/no, equal/not-equal.
While you may want simple equality it's entirely plausible that someone else is going to need to order strings as well. But if the system doesn't return enough information, how is he going to do so?
Guess we stopped at "weird" without continuing on to "why".
"...so if the two strings are the same, the result is negative [sic], which fills your code with tests like NOT comparenocase()."
And apparently the "weird comparative result" is so weird as to be incomprehensible. Again, if the strings are the same, the result is zero (not negative), so he's wrong on that score (sounds like he also needs to check his code). But logically, zero is false, and 1 and -1, being non-zero, are true. So NOT comparenocase(x,x) works, but not for the reason stated. Better to actually say comparenocase(x,x) is 0.
"None of that would be necessary if the EQ operator wasn’t twice as slow as comparenocase at comparing strings."
If a developer doesn't know why a dedicated function is faster than a generic operator in a non-type-safe language that has to evaluate both sides of an expression and potentially coerce variable types then... ah, nevermind.
"...it’s based on Java, which means that it’s full of memory leaks."
Wow. Apparently thousands of enterprise-class systems are out there leaking memory all over the place. Who knew?
"Unfortunately, it’s horrendously inefficient in manipulating text..."
As opposed to what? C? Assembly? I think we established that CF is Java. And I might add the the ColdFusion lexical analyzer and parser is written in Java. If you can parse AND execute an entire page's worth of tags with includes in milliseconds, I'd say your string manipulation isn't too shabby.
At any rate, try doing the same operations in C# or Ruby, and get back to me.
I could go on, but I think the result is obvious. If you're going to go off on a bender as to how something is "broken" or "inconsistent", it might help to take at least half a second to see if your rant is going to hold water. Maybe do just a little research? Double-check your code?
If nothing else, it appears that Andrew Keen may have a point.
And that gets under MY skin.
ColdFusion is junk. Could you honestly go in to any corporation that needs an enterprise level web application and suggest ColdFusion as their platform? Are you kidding? Every company that is already stuck with a 'legacy' CF app is now faced with the burden and realized expense of replacing that crap in order to build applications that can actually develop alongside the business.
CF is, literally and figuratively, a ball of band-aids. Trying to compare it's performance to say C# is such a joke and is the exact reason why serious developers look down on the CF community in general. IT'S CRAP. This reminds me of the FoxPro community in the early 90's. If the CF community spent 1/2 as much energy and time learning real programming languages instead of throwing together hacks the sooner they'd never look back and the world would be a better place.
[ML: Do you think if you say "crap" often enough you'll prove your point? You've offered no proof, just your opinion.]
Posted by: Dirk Bleen | February 16, 2008 at 02:33 PM