Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are Web IDL sequences lists? #14

Closed
domenic opened this issue Nov 7, 2016 · 4 comments
Closed

Are Web IDL sequences lists? #14

domenic opened this issue Nov 7, 2016 · 4 comments

Comments

@domenic
Copy link
Member

domenic commented Nov 7, 2016

Or do you convert lists to Web IDL sequences?

I think the big difference is that as defined here, lists can contain abstract things. Whereas Web IDL sequences can only contain things which are properly part of the Web IDL type system.

Maybe what we want to do here is state something like "often we use lists in a place that expects sequences, or treat sequences like lists. This kind of implicit conversion is OK, as long as the type systems match up."

@annevk
Copy link
Member

annevk commented Nov 7, 2016

There's nothing currently guarding sequences to not contain bad stuff, so I'm not sure we need to pretend they are different.

@domenic
Copy link
Member Author

domenic commented Nov 7, 2016

There is: the Web IDL type system. You literally cannot write down the type for a sequence containing bad stuff.

@annevk
Copy link
Member

annevk commented Nov 7, 2016

I mean that you can say "Let x be a sequence. Append badThing to x." That kind of misuse needs to be caught by readers.

@domenic
Copy link
Member Author

domenic commented Feb 22, 2017

Closed by whatwg/webidl@26aa830 (I got the commit message wrong)

@domenic domenic closed this as completed Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants