In an application, it would be useful to have 2 views of the same environment, on ReadOnly environment and another ReadWrite environment. In this way, the parts of the application needing only ReadOnly operations will take a ReadOnly environment and the compiler will make sure that those parts of the application will only do read only operations on the environment.
So, it would be useful to have a simple operation that will create an Environment ReadOnly out of an Environment ReadWrite. It would be the same environment, but it will be marked as ReadOnly so the compiler will only allow readonly operations on it.
In an application, it would be useful to have 2 views of the same environment, on ReadOnly environment and another ReadWrite environment. In this way, the parts of the application needing only ReadOnly operations will take a ReadOnly environment and the compiler will make sure that those parts of the application will only do read only operations on the environment.
So, it would be useful to have a simple operation that will create an
Environment ReadOnly
out of anEnvironment ReadWrite
. It would be the same environment, but it will be marked as ReadOnly so the compiler will only allow readonly operations on it.