nice feature we added in 6.1, shorthand notation f...
# lucee
z
nice feature we added in 6.1, shorthand notation for structs
Copy code
lucee = "rocks";
ralio = "rocked";
st = { lucee, ralio };  // produces { "RALIO":"rocked","LUCEE":"rocks" }
https://docs.lucee.org/reference/functions/structnew.html (fixed linked, not localhost lol)
👍 5
👍🏼 1
e
nice!
hey, any chance of getting something similar to javascript template literals for cfscript? (or does it already exist in some form?) so string can be declared using backticks so you don't have to worry about escaping internal quotes
💯 1
z
example?
you mean like this?
Copy code
dump(`this is a string with "quote's"`);
e
yes, exactly!
z
the first step is to post a proposal under https://dev.lucee.org/c/language/proposals/12
e
will do, thanks!
z
you can use backticks on the forum markdown style for code samples, single for inline, three for code blocks
e
ah, got it, thanks!
q
Hah. I've been using the shorthand notation for structs that you noted above for the last few months, not realizing it was new. I think I stumbled on it accidently and found it convenient.