cueckoo

Results 280 comments of cueckoo

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/253#issuecomment-571996095_ I can see the following options: 1) keep as is (`int` and `float` are both instances of `number`) 2) keep as is, but remove...

_Original reply by @rudolph9 in https://github.com/cuelang/cue/issues/253#issuecomment-572782118_ One consideration (particularly for options 3 and 4), importing cue specs into other languages is to use _field attribute_ to indicate a float type....

_Original reply by @rudolph9 in https://github.com/cuelang/cue/issues/253#issuecomment-572787261_ > 3. only have number and int as type, where int is an instance of number. 0.0 would be of type number while 0...

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/253#issuecomment-677736494_ @rudolph9 `c: number & int // => number` this would currently result in int. There are various strong reasons to adopt this proposal in...

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/253#issuecomment-739462008_ Another data point: The Go json unmarshaler doesn't allow decoding 1.0 into an int. Atm, I'm leaving to option 3. Open to evidence it...

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/253#issuecomment-739462513_ There seems to be no consistency in the JSON schema world on this matter: The precise treatment of the “integer” type may depend on...

_Original reply by @rudolph9 in https://github.com/cuelang/cue/issues/253#issuecomment-740077155_ > 0.0 would still not be assignable to int, but 0 would be assignable to number and 0.0 and 0 would unify to 0.0....

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/253#issuecomment-753592585_ > `0.0` ultimatley constrains the same number as 0 That is not necessarily true. A big benefit to keep `number` separate from `int` is...

_Original reply by @extemporalgenome in https://github.com/cuelang/cue/issues/253#issuecomment-767944418_ > Allowing literals to be of multiple types (e.g. `0` is of type `int|float`) is not an option. It was considered in the past...

_Original reply by @mpvl in https://github.com/cuelang/cue/issues/353#issuecomment-759951670_ Actually, the "fix" was an introduction of a bug. This should indeed be an incomplete value: the embedded disjunction results in two different structs....