function someFunc(arg1,arg2) { ... }
That means you cannot have optional arguments and you have no type checking. You might want to say:
function someFunc(
numeric arg1,
string arg2 = "foo"
) { ... }
This ensures someFunc only accepts numeric values for arg1 and it allows arg2 to be omitted in calls, taking the default value of "foo".
Wouldn't that be nice?
In Railo, you can already do this!numeric arg1,
string arg2 = "foo"
) { ... }

3 responses so far ↓
1 Ben Pate // May 8, 2009 at 6:52 PM
No seriously, this is a great feature. I've seen lots of small features in Railo that I really envy. Overall, I'm glad that there's competition in the CFML area, because it will help push everyone forward.
Now Sean, will Adobe take up all these little challenges? Will the standards committee be able to sort out stuff like this (admittedly small) enhancement to CFML?
2 Sean Corfield // May 8, 2009 at 7:09 PM
3 Russ // May 8, 2009 at 7:16 PM
Leave a Comment