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
A readonly type would be a type that, once a value of this type is defined, cannot be modified using any of the usual mutators defined automatically for a type.
The implementation of this should be as simple as only creating the getters (not mutators) for a readonly type. However, it might just be better to make the mutators private, as this would allow modifications to a value inside the type, but not outside.
A type could be defined to be readonly using the type modifiers we have currently for unique types. A la
type {readonly} tuple(A, B) { tuple(fst:A, snd:B) }
The text was updated successfully, but these errors were encountered:
A
readonly
type would be a type that, once a value of this type is defined, cannot be modified using any of the usual mutators defined automatically for a type.The implementation of this should be as simple as only creating the getters (not mutators) for a
readonly
type. However, it might just be better to make the mutators private, as this would allow modifications to a value inside the type, but not outside.A type could be defined to be
readonly
using the type modifiers we have currently forunique
types. A laThe text was updated successfully, but these errors were encountered: