Kotlin / kotlin-spec

Kotlin Language Specification:
https://kotlinlang.org/spec
Apache License 2.0
387 stars 80 forks source link

Remove note/callout that doesn't make sense #81

Closed punzki closed 3 years ago

punzki commented 3 years ago

There is no type U, there is only type T

ice-phoenix commented 3 years ago

Hi mate, thanks for the PR! If you'd be so inclined, could you rebase the fix onto the develop branch? Cheers!

ice-phoenix commented 3 years ago

On another hand, the note you're proposing to drop explains what conformance between two types means, e.g., "receiver type conforms to type T" or "T conforms to the type type(e)", and in the definition U and T are simply variables. If we drop the note, we do not know what "conformance" means, and that seems to make even less sense.

punzki commented 3 years ago

On another hand, the note you're proposing to drop explains what conformance between two types means, e.g., "receiver type conforms to type T" or "T conforms to the type type(e)", and in the definition U and T are simply variables. If we drop the note, we do not know what "conformance" means, and that seems to make even less sense.

Oh I see, that makes sense. It was confusing to me when I first read it; I thought "What is type U? I don't see it mentioned at all above." I see the value of explaining what conformance means. Perhaps we can keep the note if we add U above, i.e., we change "whose receiver type conforms to type T" to "whose receiver type U conforms to type T" in points 2 to 6. What do you think?

ice-phoenix commented 3 years ago

Sounds good, mate! If you can also do this change, that would be great; otherwise, we can figure it out on our side =)

PS: If you wanna do it, could you rebase to the develop branch? We prefer not to change the release branch in between spec releases. Cheers!

punzki commented 3 years ago

@ice-phoenix Thanks for taking care of this! I was busy and out and was unable to get to this in the meantime.