Re: [Pharo-users] Dynamically changing code in a safe way

2017-11-04 Thread abdelghani ALIDRA via Pharo-users
--- Begin Message --- Thank you guys for your answers and (very very) sorry for the delay. Yes. The "everything is an object" Makes things so simple and clear :) For me, this means that Pharo ensures “structural consistency”. The functional coherence is not  however guaranteed. I mean, two object

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-24 Thread Prof. Andrew P. Black
> On 24 Oct 2017, at 22:48 , Peter Uhnák wrote: > > > Why the assignment of the new code is delayed until the end of the bloc > > execution? > > The assignment is performed immediately, but the old code is still being > executed. Once the value was sent to the block, the block started execut

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-24 Thread Peter Uhnák
> Why the assignment of the new code is delayed until the end of the bloc execution? The assignment is performed immediately, but the old code is still being executed. Once the value was sent to the block, the block started executing and is no longer under the control of the HotSwapping object. O

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-24 Thread Prof. Andrew P. Black
> On 23 Oct 2017, at 23:12 , Richard Sargent > wrote: > > Imagine if I were to hand you a loaf of bread and tell you to feed it to the > dog. If I were then to hand you another loaf of bread, the dog would continue > eating the first loaf. We never told the dog to do anything else. If your

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-23 Thread Richard Sargent
This is a great question, Abdelghani. It comes down to the meaning of the phrase "everything is an object". When you wrote "currentBloc value", that caused the block *[ 1 to:50 do: [:index |Transcript show: index. 100 milliSeconds asDelay wait]. Transcript cr. 1000 milliSeconds asDelay wait ]* to

[Pharo-users] Dynamically changing code in a safe way

2017-10-23 Thread abdelghani ALIDRA via Pharo-users
--- Begin Message --- Hi, If I create a class HotSwapping with the instance variable currentBLoc (and the corresponding accessors) and the following methods : HotSwapping>>initialize currentBloc := [ 1 to:50 do: [:index |Transcript show: index. 100 milliSeconds asDelay wait]. Transcript