-
Notifications
You must be signed in to change notification settings - Fork 470
Coercion improvements #7507
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
Not sure if this example falls under that, but it would be great if we could do the following:
|
I don't think that example is complete...? What is |
Oh, sorry s for string. |
Ah right. So you essentially mean implicit coercion. No, that's something we've intentionally decided against. We want any type coercion to be explicit. There are many reasons:
|
Got it, thanks! |
Listing some ideas for improvements to coercion/subtyping.
"hello" :> JSON.t
and1. :> JSON.t
works, but not1 :> JSON.t
,true :> JSON.t
ordict{"test": "hello"} :> JSON.t
The text was updated successfully, but these errors were encountered: