Gidsss / UwUIDE

A compiler made to be cute uwu >~<
6 stars 0 forks source link

make arrays pass by value in fn/method/constructor calls, and assignments #209

Closed am-cid closed 6 months ago

am-cid commented 6 months ago

so that we won't have unexpected mutability like

a-chan[] = {1,1,2}~
b-chan[] = a~
b[0] = 0~

>.< prints 0,1,2, ok
pwint(b)~

>.< must print 1,1,2 but due to python's pass by reference by default, it will print 0,1,2
pwint(a)~ 
>.< must print false but prints true instead due to above
pwint(a==b)~
am-cid commented 6 months ago

we decided that we are fine with pass by reference by default. closing this now