Plange


returns a new type wrapping the specified type so that no fields/properties may be written/set and only functions that do not alter state may be called, which includes all pure functions

Notes

The returned type also provides an implicit cast back to the non-wrapped (non const) type, iff the wrapped type can be value copied. Due to the limitations of static analysis, violations of Const correctness may not be detected until runtime. Warnings are generated during compile time if static analysis was inconclusive.


copyright © Brent Lewis 2017