Visibility | Change |
Visibility access constraint is one of the most basic forms of constraints: if you do not (and can not) know something exists, you can not use it. Almost all programming languages support this type of constraint, but most only know two stages: public or private.
The exact meaning of access depends on the context where it is used, usually private indicates the file, restricted indicates the module, and public well.... The default value is private.
You can not force access. Period. It is the most basic form of protection.
Declares additional restrictions to external variables used in the code block. This is equivalent to calling a function with, say, an alterable variable, whilst the function expects a constant.
It is allways allowed to limit access further:
You do not need force if you just want to limit the access, and you can not force a constant variable to become alterable.
What use, then, is force on access?
You can force part of a constant type to be alterable during definition: so you can have an immutable type which can still cache expensive computations.