-
Notifications
You must be signed in to change notification settings - Fork 832
[RFC FS-1068] open static classes #6309
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
Conversation
Does that mean this will not work with C# extensions? |
No - C# doesn't have static extension methods (though they've been talking about "extension everything" like F#). |
|
I've noticed this failure before - I think we have some kind of glitch in our binary writer on an edge case: |
Seems related to fsprojects/Paket#2640 |
|
Great to see this :-) Quick question:
Is this not the same issue that we have today if you open two modules with the same |
|
It's the same issue, just exacerbated since there are now two ways to get the issue. |
Is that really an issue? I thought previously opened declarations are simply shadowed by the new declarations when you open the new module? Isn't that basically how Personally, I'd like to see static classes and modules unified so that |
|
@cartermp ok - to me then this is nothing to worry about then. The flipside is that it unifies the end-user experience in terms of consistency - you can now open static classes just like modules (which ironically are compiled into static classes). @chkn I have no problem with this RFC (indeed, I created the original one some years ago ;-) |
|
Don't forget in F# there are no nested types so modules and types each have their place in the current scheme. I would be happy to just have open capability, I don't think we need another way of making modules. |
|
The usual flaky test: |
|
Odd unexpected failure after integrating: |
|
Closed in favour of #6807 to use a feature branch |
Proof of concept for RFC FS-1068 Open static classes.
Details are on the RFC, but for example:
TODO:
RequireQualifiedNameAttribute(true)on a static class, that prevents it being opened, or at least gives a warning, as for F# modules.