Re: [w3c/manifest] Why is purpose a "unordered set of unique space-separated tokens"? (#903)

> > We already need the string parsing for sizes anyway.
> 
> That should be removed too, just sayin'.

We map acceptable values for `sizes` to the HTML spec, so it's unlikely to happen.

> > What benefit would we gain from this moving to being an array instead of a space-separated string
> 
> Because then it can be flagged as deprecated and future versions could remove it. People tend to use W3C specs as templates for their own ideas, and this idea shouldn't be propagated. It's better to express what you mean than try to be clever with a string, especially when the tools are available (this is a JSON-compatible context so arrays exist)

You'll see we have done this for newer properties like `categories` and `display_override`. Backward compatibility is a cornerstone of the web though, so the best you can probably hope for when it comes to `purpose` (or `sizes`) is enabling either syntax to be used, but that adds greater parsing complexity too. Doing that to achieve some form of syntactic purity isn't a hill I'm particularly inclined to die on. I'd rather focus on ensuring future additions to the shed do things better from the jump (as you suggest). 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/903#issuecomment-1029697915
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/issues/903/1029697915@github.com>

Received on Friday, 4 February 2022 06:32:05 UTC