[squeak-dev] [BUG] Issue with Matrix in instance variable
K K Subbu
kksubbu.ml at gmail.com
Wed Feb 19 15:36:14 UTC 2020
On 19/02/20 2:38 PM, Marcel Taeumel wrote:
> initialize
> super initialize.
> grid := Matrix rows: 3 columns: 3 contents: #(
> 5 3 0
> 6 0 0
> 0 9 8 )
Here is a simpler example.
b := 'hello'.
a := 'hello'.
a at: 5 put: $!.
b inspect
Shouldn't literals be immutable, particularly those with multiple refs?
The #at:put: should have raised an error.
What if b is passed to a method to create a symbol and it gets changed
meanwhile in another thread? Won't hell break loose ;-)
Regards .. Subbu
More information about the Squeak-dev
mailing list
|