2019 - July I Love Lucee

Seen something interesting in the Lucee or CFML community this month? Post it here!
image

As always I love Lucee is a quick review of Lucee and CFML happenings in general!

1 Like

Look for the entire series in the July news letter!

1 Like

A Quick Example Of Functional Programming (FP) In CFML

I was adding a feature to CommandBox CLI this week when I typed up some code that iterated over the keys in a struct, filtering out the ones it needed and then performed an action on the matching ones. I used the functional methods structFilter() and structEach() in CFML. They are an example of functional programming as they accept functions as input. This also means we can call them "higher order functions. But termininology aside, I typed up the same code using an older interactive approach just to compare the two. It was an interesting and rather self contained example so I thought I’d share it as a real life use case for FP (functional programming).
A Quick Example Of Functional Programming (FP) In CFML

arguments
    .filter( ( k, v ) => k != 'scriptName' )
    .each( ( k, v ) => systemSettings.setSystemSetting( k, v ) );

h/t @bdw429s for sweet FP :lollipop:

https://twitter.com/mjclemente84/status/1149782589647020032?s=20


What is the Modulus Operator? A Short Guide with Practical Use Cases

Addition, subtraction, multiplication, and division. These are the four mathematical operations I was taught during my childhood education, and their operators, + , - , * , / , are very familiar. I was not taught % , the modulus operator , which I recently discovered can be quite useful and interesting in its own right.
What is the Modulus Operator? A Short Guide with Practical Use Cases | Matthew J. Clemente

h/t @mjclemente

An oldie but a goodie…

CFSCRIPT ColdFusion Cheat Sheet
https://www.petefreitag.com/cheatsheets/coldfusion/cfscript/

h/t @pfreitag

h/t @andrew

1 Like

https://lucee.daemonite.io/t/mid-year-development-update/5796

https://twitter.com/BenNadel/status/1155085084845887491?s=20


ColdFusion is so hot right now :slight_smile:

Indeed it is.