johnbarrett
02/09/2023, 7:37 PMPatrick
02/09/2023, 7:41 PMbdw429s
02/09/2023, 7:42 PM=== operators!bdw429s
02/09/2023, 7:42 PMjohnbarrett
02/09/2023, 7:47 PMblusol
02/09/2023, 9:38 PMbdw429s
02/09/2023, 9:41 PMbdw429s
02/09/2023, 9:41 PMbdw429s
02/09/2023, 9:42 PMblusol
02/09/2023, 9:42 PMbdw429s
02/09/2023, 9:42 PM=== as "chasing after cool things other languages have". I've never in my 20+ years as a CF dev thought to myself, "Hey, I wonder if this variable is truthy AND is a proper boolean??"blusol
02/09/2023, 9:43 PMbdw429s
02/09/2023, 9:44 PMif( setting === true )
and then sit back and admire the great work they've done in the universe that day rooting out imposter settings which were accidentally defined as
var setting = "true";
but frankly, I don't see the point. If it's truthy, then it's truthy.blusol
02/09/2023, 9:44 PMbdw429s
02/09/2023, 9:45 PMbdw429s
02/09/2023, 9:46 PMif( myQry.recordCount ) {}
instead of
if( myQry.recordCount > 0 ) {}
etcbdw429s
02/09/2023, 9:48 PMsum = "3" + "5";
is totally legit, I don't see the point of
if( age === 35 )
when
if( age == 35 )
will do just fine. If the age variable somehow came in as a string (which would still pass a numeric check in the function arguments), who cares?blusol
02/09/2023, 9:48 PMbdw429s
02/09/2023, 9:49 PMblusol
02/09/2023, 9:49 PMjoechastain
02/09/2023, 9:51 PM====?bdw429s
02/09/2023, 9:52 PMbdw429s
02/09/2023, 9:52 PMbdw429s
02/09/2023, 9:54 PMbdw429s
02/09/2023, 9:54 PMbdw429s
02/09/2023, 9:55 PMbdw429s
02/09/2023, 9:55 PM=== in Lucee
public static boolean eeq(Object left, Object right) throws PageException {
return left == right;
}bdw429s
02/09/2023, 9:56 PM== check on the objectsblusol
02/09/2023, 9:56 PMbdw429s
02/09/2023, 9:56 PMThe == operator can be used to check if two object references point to the same object.
bdw429s
02/09/2023, 9:57 PMbdw429s
02/09/2023, 9:57 PMbdw429s
02/09/2023, 9:59 PMblusol
02/09/2023, 9:59 PMbdw429s
02/09/2023, 9:59 PM=== on purposebdw429s
02/09/2023, 9:59 PMblusol
02/09/2023, 10:03 PMblusol
02/09/2023, 10:03 PMAndreas
02/10/2023, 1:13 PMAndreas
02/10/2023, 1:21 PMAndreas
02/10/2023, 1:22 PMAndreas
02/10/2023, 1:23 PMbdw429s
02/10/2023, 4:35 PMa function in a functionAnd that's not even a correct answer, lol. Imagine this code index.cfm
<cfset foo = ()=>{}>
Where's the "outer" function?bdw429s
02/10/2023, 4:36 PMblusol
02/10/2023, 10:04 PM