[squeak-dev] The Trunk: System-ul.1148.mcz
K K Subbu
kksubbu.ml at gmail.com
Wed Mar 25 13:03:45 UTC 2020
On 25/03/20 2:11 PM, Eliot Miranda wrote:
> Why not change Object class>>readFrom: to answer mutable objects?
+1. Since immutability has been introduced only now, it makes sense for
readFrom to return mutable objects and then use a message to turn it
(Object readfrom: file) beReadOnly
BTW, the object being read is a secret key. Wouldn't making it mutable
or allowing copies increase leak risk? Like mutability, we could mark
certain objects as secrets so that they are wiped clean during garbage
collection. Or, the garbage collector could wipe out the first word of
an object while finalization.
Squeak often loads such small objects from files. Is there a way to load
an entire object from a file in a single message (a counterpart to
#saveOnFileNamed:). This could even be made a primitive for efficiency.
The primitive can fail if the file exceeds a set limit (say 10% of free
Regards .. Subbu
More information about the Squeak-dev