-
-
Notifications
You must be signed in to change notification settings - Fork 51
Rename JSValueConstructible
and JSValueConvertible
#87
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
Comments
The fork I based those implementations off of used |
I like |
I prefer They are examples of protocol naming uses in stdlib.
|
I also wanted to mention that |
I discussed this topic in the Japanese Swift community and I think ConstructibleFromJSValue and ConvertibleToJSValue are the best pair.
This pair is really ambiguous about "input" and "output".
It feels like Encode/Decode implies that member methods do some serialization. But our protocol does not serialize but just convert JS/Swift values.
From stdlib use cases,
It feels like this pair is the most explicit representation and is precise pair. |
Created #88. One last thing to consider: is public typealias JSValueCodable = ConvertibleToJSValue & ConstructibleFromJSValue |
I just started preparing a PR like that myself, but you were first 😄 I'd suggest |
I always forget which is which, maybe something like
ConvertibleToJSValue
andConstructibleFromJSValue
would be more explicit?The text was updated successfully, but these errors were encountered: