#pragma exhibit -- permit verification of resources available in a scope #8854
-
#pragma exhibit Proposal Motivation Purpose Structure Example -- csharp --
In this example, the EExampleNamespaceExhibit abstract class includes all of the top-level accessible members of ExampleNamespace. Additional Considerations Utility |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
Can you fixup your markdown? It's very difficult to make out what you're asking for with the incorrect code fencing everywhere. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Why is a language feature needed for this. This seems just as possible with an analyzer that does the same management/validation. |
Beta Was this translation helpful? Give feedback.
-
So the idea is that you can write a class that implements the same shape as some arbitrary abstract class, but without actually deriving from it? What is the purpose of that? Why not just derive from the abstract class? Also, why would this need to be a |
Beta Was this translation helpful? Give feedback.
-
This looks like a lot of code duplication and cumbersome to maintain/keep in sync. If you want to document/verify the API surface of your application, there are other tools, like for example https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md which was developed by the Roslyn/C# language design team. Generally, this is not something that needs a language change, it can be expressed using analyzers and a DSL. Language changes are very costly to implement and I'd rather see language features that increase the expressiveness of the language and enable new things such as extensions or discriminated unions.
What do you mean by that? |
Beta Was this translation helpful? Give feedback.
Fixing the markdown is definitely a priority. If it helps, I have my original manuscript
pragma exhibit propoasl.odt