3 ms·
In Monte, this object is proven by the compiler/interpreter to be transitively immutable: object popsicle as DeepFrozen: to getFlavor() :Str: # Obv
by DonbunEf7 9y ago
In Monte, this object is proven by the compiler/interpreter to be transitively immutable:
object popsicle as DeepFrozen:
to getFlavor() :Str:
# Obviously immutable.
return "lime"
to getObservedColor(eye):
# The eye might not be immutable, but that's still okay.
# All that's required is that this object not secretly stash the eye.
return eye.observeCMYK(38, 0, 78, 1)
You radically underestimate the intelligence of your fellow humans.
- adrianN 9y agoIn C++ the same can be achieved by using "const". I don't think that such properties are very useful in preventing security problems.