Re: [Pharo-users] Passed by references and by value

2014-09-26 Thread Alexandre Bergel
Indeed, one should not care about copy by value / reference in Pharo. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Sep 25, 2014, at 4:52 PM, stepharo wrote: > >> Hi, >> In PBE says

Re: [Pharo-users] Passed by references and by value

2014-09-26 Thread Henrik Johansen
On 26 Sep 2014, at 8:24 , Marcus Denker wrote: > > On 25 Sep 2014, at 20:28, Esteban A. Maringolo wrote: > >> 2014-09-25 15:14 GMT-03:00 nacho <0800na...@gmail.com>: >>> Hi, >>> In PBE says that ordinary objects' ivars are passed by references and small >>> integers are passed by value. >>> I

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Marcus Denker
On 25 Sep 2014, at 20:28, Esteban A. Maringolo wrote: > 2014-09-25 15:14 GMT-03:00 nacho <0800na...@gmail.com>: >> Hi, >> In PBE says that ordinary objects' ivars are passed by references and small >> integers are passed by value. >> Is there a way to know if a class is passed by reference or by

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Marcus Denker
On 26 Sep 2014, at 08:07, Clément Bera wrote: > Depending on the VM you use, different objects are passed by values. > > Currently -> only smallintegers > on Spur 32 bits VM -> smallintegers and characters > on Spur 64 bits VM -> smallintegers, characters and smallfloat > > But as Stef said it

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Clément Bera
Depending on the VM you use, different objects are passed by values. Currently -> only smallintegers on Spur 32 bits VM -> smallintegers and characters on Spur 64 bits VM -> smallintegers, characters and smallfloat But as Stef said it does not really matter in smalltalk. 2014-09-25 21:55 GMT+02:

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread nacho
" stepharo wrote >> Hi, >> In PBE says that ordinary objects' ivars are passed by references and >> small >> integers are passed by value. > > Strange I do not remember having written that. > Especially because in Smalltalk this has no real interest. > > > Well you also wrote that :p > > "Deep

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread stepharo
Hi, In PBE says that ordinary objects' ivars are passed by references and small integers are passed by value. Strange I do not remember having written that. Especially because in Smalltalk this has no real interest. Is there a way to know if a class is passed by reference or by value? In Sma

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Esteban A. Maringolo
I forgot. Floats too. And I think that's it. Esteban A. Maringolo 2014-09-25 15:35 GMT-03:00 Mark Rizun : >> > Only small integers are passed as value? >> >> Yes. >> >> It has to do with the object headers, SmallIntegers are embedded in the >> OH. > > > What about Float, for example? >

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Alexandre Bergel
Floats are passed as values. Objects that are passed as values should be immutable, as floats and integers. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Sep 25, 2014, at 3:35 PM, Mark

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Mark Rizun
> > > Only small integers are passed as value? > > Yes. > > It has to do with the object headers, SmallIntegers are embedded in the OH. What about Float, for example?

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Esteban A. Maringolo
2014-09-25 15:14 GMT-03:00 nacho <0800na...@gmail.com>: > Hi, > In PBE says that ordinary objects' ivars are passed by references and small > integers are passed by value. > Is there a way to know if a class is passed by reference or by value? > Only small integers are passed as value? Yes. It h

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Mark Rizun
Hi, Most classes are passed by reference including those that were defined by user. But classes like integer are passed by value. I think it's similar to C#. I may be wrong, so better wait for another more competent reply:) Best, Mark 2014-09-25 21:14 GMT+03:00 nacho <0800na...@gmail.com>: > Hi

[Pharo-users] Passed by references and by value

2014-09-25 Thread nacho
Hi, In PBE says that ordinary objects' ivars are passed by references and small integers are passed by value. Is there a way to know if a class is passed by reference or by value? Only small integers are passed as value? Thanks in advance Nacho - Nacho Smalltalker apprentice. Buenos Aires,