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

Static type-pattern based feature spec for scoped static extension methods #292

Closed
wants to merge 3 commits into from

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Mar 29, 2019

This PR is a static variant of the PR #284. It adds the file 'feature-specification-using-static-type-patterns.md' to the directory which is concerned with static scoped extension methods.

It is an initial version of a feature specification of static scoped extension methods where only the core is covered (the extension methods themselves and their static and dynamic semantics, but no static methods or other "auxiliary" features that extensions could have).

It is based on using type patterns (#170) to specify how to extract the type arguments of the statically known type of the given receiver.

This means that extension methods can be considered to be a thin layer of syntactic sugar on top of global functions and their invocation.

However, static type patterns are more powerful than the static+dynamic ones used by #284, because we do not have to enforce that the type patterns are 'subtype robust', which means that they can work as a somewhat more powerful constraint language.

@eernstg eernstg changed the title Static Type-pattern based feature spec for scoped static extension methods Static type-pattern based feature spec for scoped static extension methods Mar 29, 2019
@eernstg
Copy link
Member Author

eernstg commented Jul 3, 2019

Abandoned: We chose to use an approach based on type inference rather than type patterns.

@eernstg eernstg closed this Jul 3, 2019
@eernstg eernstg deleted the extension_method_static_type_patterns_mar19 branch July 3, 2019 15:51
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.

3 participants