IIFEs - Inline Closures do not execute but give a compiler error

Description

http://en.wikipedia.org/wiki/Immediately-invoked_function_expression

This should work in CFML:

Where "work" means it outputs hi. This is a very contrived example, but being able to memory space blocks of code is quite handy in other languages, and that CFML has function expressions but NOT IIFEs seems a bit half-implemented.

See equiv ColdFusion ticket: https://bugbase.adobe.com/index.cfm?event=bug&id=3950736

Environment

None

Activity

Show:
Igal Sapir
March 29, 2017, 9:09 PM

I still can't think of a real world use case that can not be achieved in a clearer and simpler manner in CFML without this.

The only "valid" example I saw was currying, which is very interesting academically speaking, but did anyone ever need it in a real world application?

Michael Offner
May 2, 2017, 1:58 PM
Adam Cameron
May 2, 2017, 2:34 PM

What's that link supposed to be to, ? Looks to me like a metadata change, but no actual code change?

Michael Offner
May 2, 2017, 2:44 PM
Adam Cameron
May 2, 2017, 2:45 PM
Edited

Aha. Yeah that stuff looks more like it. Cool.

When'll it be available on the update channel?

No rush or nuthin', but will just test it out once it's available.

Cheers!!

Fixed

Assignee

Michael Offner

Reporter

Adam Cameron

Priority

Minor

Labels

None

Fix versions

Sprint

None

Affects versions