2014-10-27 17:03 GMT+01:00 Marcus Denker <marcus.denker@gmail.com>:
I could imagine cases where, in very tight memory situations or with very
very large literals, we could make use of modifying literals. But I'm not sure this is a significant requirement, or that it couldn't be considered if there is a significant (and rich) use case to fund the development of the slow path.
Pharos does not target classic "resource constraint" embedded scenarios. (else we would do many things a lot different)
Is there a critic rule catching that sort of thing? That we could run on Squeaksource / Smalltalkhub?
No, as you can hand a reference to a literal over to someone else who does not even know that it is a literal... this dreaded "am I going insane, it's writing right here" bug where you change a string somewhere that actually is a string literal of some method...
You mean, as in: MyClass>>foo #(false) first ifFalse: [ 'first call since compilation' logCr ] ifTrue: [ 'other calls' logCr ]. ^ #(false) in a workspace 4 timesRepeat: [MyClass new foo at: 1 put: true ] Thierry
Marcus