cue icon indicating copy to clipboard operation
cue copied to clipboard

Revisit whether true, null etc can be used as identifiers

Open myitcv opened this issue 3 years ago • 2 comments

Per discussion with @mpvl

if: true
true: true
null: null

// etc...

https://cuelang.org/play/?id=3aU41xcIysr#cue@export@cue

myitcv avatar Jan 17 '22 09:01 myitcv

For pseudo keywords like if definitely. But for keywords that are also values like true and null, this seems confusing.

mpvl avatar Jan 17 '22 11:01 mpvl

Very much related: cue fmt should probably transform e.g. true: true into "true": true for the sake of clarity, even if we continue allowing true: true to be valid. See https://github.com/cue-lang/cue/issues/2242.

mvdan avatar Dec 06 '25 14:12 mvdan