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

Scala's subsumption can't be controlled #7857

Closed
scabug opened this issue Sep 18, 2013 · 5 comments
Closed

Scala's subsumption can't be controlled #7857

scabug opened this issue Sep 18, 2013 · 5 comments

Comments

@scabug
Copy link

scabug commented Sep 18, 2013

After two years of deliberations, I have come to the conclusion that the inability to tell Scala's subsumption not to subsume the input type parameter on methods of covariant types can not be worked around in any way.

And it prevents correct implementation of certain features which also can not be worked around in any other way. I really wanted to mark this as a bug, instead of an improvement, because it blocks essential functionality that can not be achieved any other way. Feel free to change it to a bug if you agree with me. It is said that if a type system can't correctly type the "contains problem" then it is not worth going through the effort to enforce types at all at compile-time. Refer to the following links for the proof and example use cases which support this.

http://stackoverflow.com/questions/8360413/selectively-disable-subsumption-in-scala-correctly-type-list-contains

Note it is not just contains which is affected yet it is the ability to correct type anything that is an input to a covariant type:

https://groups.google.com/d/msg/scala-debate/LWBz3-Q0pNI/rWG4hImvCQgJ

https://groups.google.com/d/msg/scala-language/lChLcLES_Dk/b78ywjsHcbMJ

@scabug
Copy link
Author

scabug commented Sep 18, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7857?orig=1
Reporter: Shelby Moore III (shelby)

@scabug
Copy link
Author

scabug commented Sep 18, 2013

@retronym said:
Shelby,

Please don't raise bugs on the language like this without some sort of consensus from scala-language and/or scala-internals.

I can't work in this issue tracker otherwise. It's not a venue for discussion or wishlists, but rather a (already long) list of things that we can action.

@scabug
Copy link
Author

scabug commented Sep 18, 2013

Shelby Moore III (shelby) said:
I had also cross-posted to scala-language:

https://groups.google.com/forum/#!topic/scala-language/B6f-iubR9Mk

I've been accepting feedback on this for 2 years at SO, and no one has offered a solution. Okay perhaps I jumped the gun, let's see what others say at scala-language. Apologies if I end up being wrong on this one. Even if I am correct, I accept your point. Will do. I got impatient on this one and want to just file it while it is fresh in mind. Two years is a long time. Yet I get your point about proper vetting procedure.

@scabug
Copy link
Author

scabug commented Sep 18, 2013

Shelby Moore III (shelby) said:
Can you please change it to "Won't Fix" instead of "Fixed" pending outcome of discussion at scala-language. Fixed is the wrong attribute, as Scala's subsumption has not suddenly become controllable.

@scabug scabug closed this as completed Sep 18, 2013
@scabug
Copy link
Author

scabug commented Sep 18, 2013

@retronym said:
I closed it as "incomplete". I intended to use that classification originally, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants