Comments (3)
@dsyme - related to https://visualfsharp.codeplex.com/workitem/29 and/or #27 ?
from fsharp.
For F# 4.0 (and F# 3.x) it seems best to resolve this as by design. In F#, "private" means "private to the enclosing module or type". However, the meaning of "private" for a construct in a namespace needs clarification.
The F# Language Spec for F# 2.x-4.0 will be adjusted to clarify that "private" on a type or module in a namespace declaration group "namespace N = " means "accessible from that namespace declaration group, or any namespace declaration group in the same assembly contributing to either N of a sub-namespace of N." This means that a private construct in namespace N is accessible from all other namespace declaration groups in the same assembly contributing to N.
I understand that this is a weaker form of "private" than simply "private to the encloding namespace declaration group" or "private to the file". However, it is as F# 2.0-3.x has always implemented. Any adjustment to restrict this is surprisingly non-trivial, partly because we must give a warning for existing uses, rather than an error. This needs a lot of care beyond what I'd like to see for F# 4.0 at this stage.
I've added an F# Language User Voice suggestion suggesting we consider restricting this in future versions of F#.
(BTW the only other modification that looks reasonable here for F# 4.0 would be to simply give a warning to recommend that people use "internal" rather than "private" for types and modules in namespaces)
from fsharp.
Tracked by the user voice request
from fsharp.
Related Issues (20)
- This declaration opens the namespace or module through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. HOT 3
- [Regression] Compiler is unable to compile specific flavor of type check in patterns HOT 2
- Consider fuzzing syntax changes
- Support named argument syntax for property setters in VS HOT 4
- Don't warn FS3559 when obj is inferred if the obj is expected there HOT 1
- FS3559 triggers on query expressions
- Unexpected FS3571 shorthand lambda atomic error HOT 5
- Skip CI on comment/whitespace only changes
- Can't use addition (substruction) multiple times in member for constrained to `INumber<>` generic HOT 1
- Nested record copy-and-update expression seems to fail when copying and updating a nested value HOT 1
- Using `TailCall` diagnostic attribute on non tailcall rec function does not generate warning on Visual Studio Error List pane HOT 11
- Inconsistent 'missing `new`' warnings HOT 4
- TailCall incorrectly flags some tail recursive functions HOT 7
- Cannot use `base` as identifier in a class, even double-backticked
- VS: allowStaleResults is hardcoded false
- LSP: Choose LSP library (or define own and have a translation layer for VS one)
- LSP: Investigate New VSIX extension options
- Avoid boxing on equality and comparison HOT 3
- Write up 'Compiler Perf design session' notes from the summer (hand written papers at @T-Gro's desk)
- Query builder throws error when using ToListAsync in combination with EF Core DbSet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.