You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
Adding the [<RequireQualifiedAccess>] attribute to a module indicates that the module may not be opened and that references to the elements of the module require explicit qualified access. For example, the Microsoft.FSharp.Collections.List module has this attribute.
This is useful when functions and values in the module have names that are likely to conflict with names in other modules and requiring qualified access can greatly increase the long-term maintainability and evolvability of a library: functions can be added to the module without breaking source compatibility.
example suggestion
The List module has this attribute. This means you're not allowed to open the module:
openList// compile error!
map id [1;2]
Instead, you must do this:
List.map id [1;2]
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://github.com/MicrosoftDocs/visualfsharpdocs/blob/live/docs/conceptual/core.requirequalifiedaccessattribute-class-[fsharp].md
Require Qualified Access uses the word in the definition and therefore provides no useful information.
https://stackoverflow.com/questions/44462268/what-is-requirequalifiedaccess-attribute
I had to read stack overflow to figure out what this actually did.
From F# org
Adding the
[<RequireQualifiedAccess>]
attribute to a module indicates that the module may not beopen
ed and that references to the elements of the module require explicit qualified access. For example, the Microsoft.FSharp.Collections.List module has this attribute.This is useful when functions and values in the module have names that are likely to conflict with names in other modules and requiring qualified access can greatly increase the long-term maintainability and evolvability of a library: functions can be added to the module without breaking source compatibility.
example suggestion
The List module has this attribute. This means you're not allowed to open the module:
Instead, you must do this:
The text was updated successfully, but these errors were encountered: