tracker issue : CF-4207716

select a category, or use search below
(searches all categories and all time range)
Title:

Allow cascading return from assignments

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Luis M. / ()

Created: 03/29/2020

Components: Language, Script CFC

Versions: 2018

Failure Type: Enhancement Request

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Linux All

Vote Count: 1

I would love for Adobe to implement immediate returns from an assignment expression.  This is supported in Lucee (fyi)

function getAuthUser(){
 return variables.userService = variables.wirebox.getInstance( variables.settings.userService );
}

As you can see, the return is the assignment of the variables userService.  This compresses expressions, instead I woudl have to do this in Adobe:

function getAuthUser(){
 variables.userService = variables.wirebox.getInstance( variables.settings.userService );
 return variables.userService;
}

Which is another line of code and well, not a nice expression.

Attachments:

Comments:

I just want to say KUDOS!!! For responding on this so fast! I am impressed, keep up the good work.
Comment by Luis M.
33312 | March 30, 2020 01:57:11 PM GMT
+1 - I like that shortcut
Vote by Aaron N.
33354 | April 06, 2020 05:33:54 AM GMT