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

Add extension method survey as markdown document. #261

Merged
merged 2 commits into from
Mar 11, 2019
Merged

Add extension method survey as markdown document. #261

merged 2 commits into from
Mar 11, 2019

Conversation

lrhn
Copy link
Member

@lrhn lrhn commented Mar 11, 2019

No description provided.

@lrhn lrhn merged commit ccf643a into master Mar 11, 2019
Copy link
Member

@munificent munificent left a comment

Choose a reason for hiding this comment

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

This is great!

A number of other languages have something that can be described as static extension methods.


## C#
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth pointing out that C# is working on adding support for extension getters, static methods, etc.: dotnet/roslyn#11159


Since C# implements generics by specialization for value types and it reifies the type for reference types, the type `T` here will be the actual type of the receiver.

Only non-nullable value types (not reference types) can be made "nullable".
Copy link
Member

Choose a reason for hiding this comment

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

C# 8.0 adds support for nullable reference types: https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-csharp/

@munificent munificent deleted the lrhn-survey branch March 20, 2019 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants