Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update first-class Span speclet with LDM decisions #8241

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

jjonescz
Copy link
Member

No description provided.

@jjonescz jjonescz requested review from 333fred and cston June 25, 2024 11:54
@jjonescz jjonescz requested a review from a team as a code owner June 25, 2024 11:54
jjonescz and others added 2 commits June 26, 2024 11:56
Co-authored-by: Charles Stoner <10732005+cston@users.noreply.github.com>
@@ -50,6 +50,9 @@ An implicit span conversion permits `array_types`, `System.Span<T>`, `System.Rea

------

Any Span/ReadOnlySpan types are considered applicable for the conversion if they match by their fully-qualified name.
If they do not match the types that are selected by the compiler's well-known type resolution logic, a compile-time error is reported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what we decided? We won't check that, and we can't really specify it either, since "the compiler's well-known type resolution logic" isn't a thing in the spec.

Copy link
Member Author

@jjonescz jjonescz Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, thanks. I thought that was part of the option we discussed, but I might have misunderstood.

Copy link
Member Author

@jjonescz jjonescz Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the question is how will we emit - do we need to find the operators on the Span types manually? It would be much easier to just use the well-known member machinery; and hence report an error if the Span type doesn't match the well-known type. Maybe that doesn't have to be specified, it can be an implementation detail like well-known types are. I could replace this sentence with something like:

Compiler implementation can report a compile-time error if the Span type from the conversion
does not match the "well-known" Span type that would be selected in other places by implementation-specific logic.

But I guess it might not be so difficult to find the required helpers.

@jjonescz jjonescz requested a review from 333fred June 27, 2024 08:48
@jjonescz jjonescz merged commit d9caa3c into dotnet:main Jun 28, 2024
1 check passed
@jjonescz jjonescz deleted the FirstClassSpan-11 branch June 28, 2024 08:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants