Re: [community-group] Remove JSON derived types from the specification (#120)

I don't really understand the arguments for the JSON derived types.

To me this argument looks like this :

| | do the work to define base types | do not do this work |
| -- | -- | -- |
| interop issues between tools | unlikely | likely |
| compatibility issues between spec versions | unlikely | likely |

Not doing the work and hoping that the type system of the carrier format (JSON) perfectly aligns with this specification is just not a good idea in my opinion.

The main difference is that unknown/unexpected things become invalid things.
This makes error handling vastly more powerful and improves interop between tools and compatibility between versions.

It might sound weird that errors are desirable but it is much better to have a hard error that allows ignoring a token.

see : https://www.w3.org/TR/css-syntax-3/#error-handling

-------------------

The specification discourages using `$extension` for typing.

https://tr.designtokens.org/format/#extensions

> In order to maintain interoperability between tools that support this format, teams and tools SHOULD restrict their usage of extension data to optional meta-data that is not crucial to understanding that token's value.

I think this was the right call and it is a mistake to suddenly suggest the opposite in this issue.

That does not mean that implementors can not experiment with non-standard types.
They just can not do so within the specification.

Implementers can do a spec+ approach like Sass or go for vendor prefixes.

----------------------

> And, aside from all of that, I think we should consider adding something like a textAlignment type to the spec!

It is the opposite that needs solving :)

What is something with type `string` in JSON and without any `$type`.

- unknown, should be ignored by tools, might get special meaning through `$extension`
- a keyword (`left`, `auto`, `inherit`, ...)
- text (`"some text"`)




-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/120#issuecomment-1279684699 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 15 October 2022 07:29:53 UTC