<cfscript>
abort;
</cfscript>
Personally that doesn't feel quite right to be a keyword - it would
feel better if it was a function.
Would people be instinctively putting in the (); to make it abort();
without realizing its a keyword?
The broader question of course is what conditions must be satisfied
before something comes part of the language keyword syntax instead of
merely a function.
Keen to hear peoples input on this.
abort(); ... delete, delete, delete
There might be different ways to abort in the future... but how do you constitute it as a keyword rather than a function? I mean, I am guessing that something is a keyword until it takes some kind of parameter or returns something?
Please let me know if I am wrong?
MD
> --
> CFML Conventional Wisdom
> http://groups.google.com/group/cfml-conventional-wisdom?hl=en?hl=en
FWIW, the CFML Advisory Committee originally selected this:
abort; // no params
abort("message"); // function call, since it takes a message
The same stands for exit; / exit("method");
Then, after further discussion, there was broad consensus that the
parentheses should be required in all cases.
Given the approach taken in some other modern languages targeting the
JVM, there is a good precedent for allowing optional parentheses for
the no-param case.
My personal preference for CFML would be to make "all" tags into
functions and therefore required () for the no-param case.
("all"... there are a couple of tags that work better as directives /
declarations: component, interface, function, param, import)
Sean
Agree! If they are all consistently: function(); the less I have to
remember - the better. :)
--
Jim Priest - thecrumb.com
Triangle Area ColdFusion User Group - tacfug.org
Without deviation from the norm, progress is not possible. ~ Frank Zappa
I agree.
> ("all"... there are a couple of tags that work better as directives /
> declarations: component, interface, function, param, import)
agreed, although param is an interesting one, i would have put that in
the "all" broad category
param( type, name, default );
Although it does bring up a broader context, which is, is it wise to
make the whole CFML language accessible via CFSCRIPT?
If that happens, is CFML still CFML? The ML (Markup Language) kinda
disappears with no tags present.
I certainly favour that approach.
I'd love to know what the logic was behind Adobe's implementation. It
certainly doesn't seem obvious at least.
Andy