I suggest you ...

RAILO-197 Have the ability to implement closures or anonymous functions

https://jira.jboss.org/jira/browse/RAILO-197

Have the ability to implement closures or anonymous functions

81 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    anonymousanonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Barney BoisvertBarney Boisvert commented  ·   ·  Flag as inappropriate

        CFScript is declared to be ECMAScript-based, so that syntax is how CFSCRIPT ought to handle it. Obviously there is no need to deal with CFFUNCTION, because tags aren't expressions, but closures (and simple anonymous functions) must be. I'd personally much rather see a "short form" syntax (a la Groovy or Ruby) instead of the rather long ECMAScript syntax, but even with a little syntactic verbosity closures would be amazingly useful.

      • MarcelMarcel commented  ·   ·  Flag as inappropriate

        Wouldn't it be easier to just have Rhino and envjs supply a JavaScript context with DOM so you could run jQuery and use closures and all the other awesome things that JavaScript provides?

      Feedback and Knowledge Base