Re: [heycam/webidl] Specify open dictionaries. (#180)

@jyasskin [wrote](#issuecomment-250880371): 
> It looks impossible to enforce that the key is a string in an LL(1) grammar, so I've stayed with the semantic check. It would be possible if we put the key second, but I'm really reluctant to use that confusing syntax. I would be willing to make the key type required.

So I know just enough about grammars to be able to read them and defer to those more knowledgeable on the topic (pointers to good resources are welcomed, btw). I concur that putting the key second is a really bad idea and would suggest making both keys required. It's slightly more verbose, but also much clearer. I imagine we'd go for something like this?

```
OpenDictionaryType ::
    dictionary < OpenDictionaryKeyType , Type >
    
OpenDictionaryKeyType ::
    "DOMString"
    "USVString"
    "ByteString"
```





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/180#issuecomment-251062755

Received on Monday, 3 October 2016 09:25:28 UTC