Fat arrow functions shouldn't require parentheses around single parameter

Description

https://www.sitepoint.com/es6-arrow-functions-new-fat-concise-syntax-javascript/

When a fat arrow function only has only param, the parentheses should be optional:

Right now Lucee requires this syntax:

Activity

Show:
John Berquist
September 23, 2019, 8:46 PM

That all sounds good to me - I was wondering though if that syntax was valid in ACF?

Brad Wood
September 23, 2019, 9:49 PM

ACF 20128 U5 only allows the parens to be optional if there is no type or default specified.

Brad Wood
September 24, 2019, 10:34 PM

Adobe 2018 update 5 came out today and supports this syntax. Transitioning this ticket to an incompatibility.

Brad Wood
September 25, 2019, 4:33 PM

Here's a set of tests that show all known bugs in Lucee and Adobe CF's fat arrow functions along with a reference implementation in JS where everything passes.

https://github.com/bdw429s/CFML-lambda-fat-arrow-functions

Assignee

Michael Offner

Reporter

Brad Wood

Priority

Minor
Configure