is (leftValue rightValue -- isIdentityLike)leftValue: First compared value.rightValue: Second compared value.isIdentityLike: Cond result that is TRUE when the identity-like comparison holds, and unknown when that comparison cannot be decided at compile time.is compares dereferenced values by identity-like equality.
All same-schema inputs are accepted. Identity-like equality is meaningful for Ref, Text, and Code values. Other same-schema inputs return FALSE.
is answers a different question from = and same. Use = for dereferenced value equality and same for dereferenced schema identity.
FALSE.FALSE even when same and = would both return TRUE.FALSE.NIL values give TRUE. Known non-NIL Code values give FALSE. Unknown Code values produce an unknown Cond result.TRUE or FALSE.{} 0 {} [
nilCode: {} () {} codeRef;
compiledCode: {} () {} codeRef;
[] !compiledCode
first: 7;
second: 7;
textA: 0 ("") dynamic @;
textB: 0 ("") dynamic @;
"-- In-place values --" printCompilerMessage
7 7 same printStack _:;
7 7 = printStack _:;
7 7 is printStack _:;
"-- Ref values compare target identity --" printCompilerMessage
@first @first is printStack _:;
@first @second is printStack _:;
"-- text compares contents --" printCompilerMessage
"hi" "hi" is printStack _:;
"hi" "ho" is printStack _:;
"-- unknown supported values can produce unknown Cond --" printCompilerMessage
textA textB is printStack _:;
"-- code --" printCompilerMessage
@nilCode @nilCode is printStack _:;
@compiledCode @compiledCode is printStack _:;
0
] "main" exportFunction
-- In-place values --
TRUE
TRUE
FALSE
-- Ref values compare target identity --
TRUE
FALSE
-- text compares contents --
TRUE
FALSE
-- unknown supported values can produce unknown Cond --
Cond
-- code --
TRUE
Cond
< builtin (leftValue rightValue -- isLess) Tests whether the left dereferenced value is less than the right one for supported same-schema numeric or known Text values.= builtin (leftValue rightValue -- isEqual) Tests dereferenced value equality for Cond, numeric, and Text values of the same schema.> builtin (leftValue rightValue -- isGreater) Tests whether the left dereferenced value is greater than the right one for supported same-schema numeric or known Text values.same builtin (leftSchema rightSchema -- isSameSchema) Tests whether two dereferenced schemas are exactly the same; this is schema equality only, not runtime-value equality.