-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Specification needs to be updated for non-strong mode generic methods. #27639
Comments
Assigning @eernstg for now - if you won't be the person doing this, can you sort out who will? |
@bwilkerson noticed that the informal spec has some discussion of |
Let's use 'syntax-only generic methods' to refer to the semantics specified in Feature: Generic Method Syntax. Then we have two topics here: (1) Should we update the language specification to cover syntax-only generic methods?, and (2) what's the status of For (1), I didn't expect to change the language specification to cover syntax-only generic methods, because that is a temporary approach which should be extended to support full-fledged generic methods (which would of course be covered in detail in the language specification). So we would rely on the informal document Feature: Generic Method Syntax for the specification of syntax-only generic methods. The full-fledged specification includes local type inference of actual type arguments passed to invocations of generic functions, and the work on specifying local type inference is not complete (and we can't just whip up a brief clarification, it will take some time). For (2), I also don't think we've decided that we will have That said, I think they are useful and probably not hard to implement. In our discussions a long time ago Lasse mentioned that |
I think that for now we should treat the syntax-only generic methods as an experiment and focus on specifying the strong mode behavior. I think that 'super' bounds would be a useful extension, but I'd rather not tackle them now. I think there are some non-trivial implications to work through for inference and for subtyping. |
The informal specification has been adjusted, and the resulting document is available here: Feature: Generic Method Syntax. |
Are we planning to incorporate this into the formal spec? |
I'm doing that now. |
CL for that change. |
@eernstg is this done? |
CL (https://codereview.chromium.org/2690553002/) still not landed. |
That CL was stalled for a while, because a new (reifying) semantics was being discussed, specified informally, and implemented in the vm. Turns out that dart2js will not implement the same thing (now, at least), so we will indeed stick to the non-reifying semantics for Dart 1.x. Now working on landing that CL again. |
Closing: Updating the language specification to specify anything new pertaining to Dart 1.x is now an obsolete task. |
Informal specification here:
https://docs.google.com/document/d/1nccOSkdSyB9ls7TD8gUqIu6Wl2J_9bTSOoMCEIoAiQI/edit#heading=h.dnanv15dn1me
The text was updated successfully, but these errors were encountered: