1. A type is a value
In CUE a type such as bool is a value: the same kind of thing as true, only less specific.

1. A type is a value

In CUE a type such as bool is a value: the same kind of thing as true, only less specific.

Schema and data stop being two languages. One notation describes both, which is what every later unit builds on.

Most languages keep two worlds. Types, like bool. And values, like true.

A type describes values. A value is the thing itself. They are kept apart.

CUE removes the wall. To CUE, bool is a value too.

Think of places. Spain is a place. So is one street address in Madrid. One is just less specific.

Bool is the less specific one. It says: true or false, not decided yet. True is decided.

So a description of data, and the data, are written the same way. One language for both.

Check yourself. In CUE, what is the difference between bool and true?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
1. A type is a value1. A type is a value
Citations 0Children & links 0

Loading child documents…

Connections show where other documents or comments link to this document.

Related documents

Loading connections…