@@ -586,7 +586,7 @@ An _atom_ is any value whose only instances are itself and bottom.
586
586
Examples of atoms are ` 42.0 ` , ` "hello" ` , ` true ` , and ` null ` .
587
587
588
588
A value is _ concrete_ if it is either an atom, or a struct whose field values
589
- are all concrete, recursively.
589
+ of regular (non-hidden and non-definition fields) are all concrete, recursively.
590
590
591
591
CUE's values also include what we normally think of as types, like ` string ` and
592
592
` float ` .
@@ -2324,7 +2324,7 @@ s: "etc. "*3 // "etc. etc. etc. "
2324
2324
2325
2325
##### Comparison operators
2326
2326
2327
- Comparison operators compare two operands and yield an untyped boolean value.
2327
+ Comparison operators compare two concrete operands and yield a boolean value.
2328
2328
2329
2329
```
2330
2330
== equal
@@ -2339,24 +2339,25 @@ Comparison operators compare two operands and yield an untyped boolean value.
2339
2339
2340
2340
<!-- regular expression operator inspired by Bash, Perl, and Ruby. -->
2341
2341
2342
- In any comparison, the types of the two operands must unify or one of the
2343
- operands must be null .
2342
+ In any comparison, both operands must be concrete; otherwise the result is
2343
+ bottom ( ` _|_ ` ) .
2344
2344
2345
- The equality operators ` == ` and ` != ` apply to operands that are comparable.
2346
- The ordering operators ` < ` , ` <= ` , ` > ` , and ` >= ` apply to operands that are ordered.
2345
+ If two operands are not comparable with each other, the result is false for ` == `
2346
+ and true for ` != ` .
2347
+ The ordering operators ` < ` , ` <= ` , ` > ` , and ` >= ` apply to operands for which
2348
+ an ordering is defined.
2347
2349
The matching operators ` =~ ` and ` !~ ` apply to a string and a regular
2348
2350
expression operand.
2349
2351
These terms and the result of the comparisons are defined as follows:
2350
2352
2351
- - Null is comparable with itself and any other type.
2352
- Two null values are always equal, null is unequal with anything else.
2353
+ - Null is comparable and equal to itself only.
2353
2354
- Boolean values are comparable.
2354
2355
Two boolean values are equal if they are either both true or both false.
2355
2356
- Integer values are comparable and ordered, in the usual way.
2356
2357
- Floating-point values are comparable and ordered, as per the definitions
2357
2358
for binary coded decimals in the IEEE-754-2008 standard.
2358
- - Floating-point numbers may be compared with integers; the comparison is
2359
- performed as if the integer was first converted to a floating-point number .
2359
+ - Floating-point numbers are comparable and ordered with respect to integers
2360
+ by first converting the integer to a floating-point value .
2360
2361
- String and bytes values are comparable and ordered lexically byte-wise.
2361
2362
- Structs are comparable but not ordered. Two structs are equal if they have the
2362
2363
same set of regular field labels and the corresponding values are recursively
0 commit comments