I suggest we ...

Allow opening of static classes (matching the C# design)

You currently can't "open" a static class e.g. System.Console - only modules or namespaces. We should be able to also open static classes as well.

31 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Isaac Abraham shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Marc Sigrist commented  ·   ·  Flag as inappropriate

        As in C#, static classes defined in F# will probably become more common. If so, would we still require static classes in F# to be defined via [<AbstractClass; Sealed>]? Or, would it make sense to reuse the static keyword known from 'static member' for 'static type'?

      • Don Syme commented  ·   ·  Flag as inappropriate

        Yes, this should I suppose be implemented to match the corresponding C# feature, since static classes will begin to be more common coming from the C# world.

      • exercitus vir commented  ·   ·  Flag as inappropriate

        I agree. Modules are compiled down to static classes anyway, so there should be no technical reason for disallowing it.

      F# Language

      Feedback and Knowledge Base