Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-29 Thread Yves Lenfant
Thanks for your quick reply. OK, your chapter highligths the polymorpism not the inheritance. So I will try to change the Number methods in a dedicated image... Anyway, in the book InsideSmalltalk P. 250, it explains that (I quote) I suppose the "Number" mecanism is more complex than I can expe

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-29 Thread Stephane Ducasse
Yes I know this article. For the book I was trying to get an example that I can just add as an extension of a previous exercise. And I like it. On Tue, Aug 29, 2017 at 9:33 PM, Yves Lenfant wrote: > I start understanding better, I found this topic in the SmalltalkWithStyle > book p. 107 > This t

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-29 Thread Stephane Ducasse
The code of Pharo for + **may** be rewritten using double dispatch but it is not that clear to me especially the adaptToInteger logic and we do not change for the sake of it :) There are plenty of places we should improve and that are really important. In Pillar, or compiler we have many more node

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-29 Thread Yves Lenfant
I start understanding better, I found this topic in the SmalltalkWithStyle book p. 107 This technic was explained by Dan Ingalls in [Ingalls 86] Ingalls, D. A Simple Technique for Handling Multiple Polymorphism. 347-349, Proceedings of OOPSLA '86, Portland, Or., ACM SIGPLAN 21(11). 1986 That you c

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-29 Thread Yves Lenfant
Ooops I wasn't int the mailing list, lets try again Hello Steph, I have questions about the concept because,probably, I miss something. I am not sneaky, let me explain. If we analyse the Kernel Numbers package, and we dissect the relation between Float, Fraction and Integer (Pharo 5.0) for e

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-24 Thread herby
On August 23, 2017 10:09:02 PM GMT+02:00, Stephane Ducasse wrote: >On Wed, Aug 23, 2017 at 9:20 PM, Herby Vojčík wrote: >> Maybe in general sumWithFoo: => addSelfToFoo: to make clues clearer. > >I see now it should be more >addSelfWithFoo: or sumSelfWithFoo: because we do not modify the argume

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Stephane Ducasse
a die handle is a group of dice as in 2D20. I'm not sure that I want to explain what is double dispatch up front. I want to go from the requirements to the solution How to add die (6) + die(5) die (6) + 2D20 2D20 + die(6) 2D20 + 2D10 Without doing a self class == Die Stef On Wed, Aug 23, 2017

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Stephane Ducasse
On Wed, Aug 23, 2017 at 9:20 PM, Herby Vojčík wrote: > Maybe in general sumWithFoo: => addSelfToFoo: to make clues clearer. I see now it should be more addSelfWithFoo: or sumSelfWith: because we do not modify the argument. Stef

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Stephane Ducasse
Tx I will read your point carefully. On Wed, Aug 23, 2017 at 9:20 PM, Herby Vojčík wrote: > Maybe in general sumWithFoo: => addSelfToFoo: to make clues clearer. > > Herby > >

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Herby Vojčík
Maybe in general sumWithFoo: => addSelfToFoo: to make clues clearer. Herby

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Herby Vojčík
Stephane Ducasse wrote: feedback is welcome Good reading 2.4 "is to explicit type check" - "is to explicitly type check", or - "is to do explicit type check" s/we will haveother/we will have other/ s/distabilizing/destabilizing/ "In fact we just to tell the receiver ,,,"

Re: [Pharo-users] new chapter on double dispatch for new book :)

2017-08-23 Thread Dimitris Chloupis
I read it once without knowing what double dispatch is, after reading it , I did not know what double dispatch is. It took several reads to understand what double dispatch is. My suggestion is starting with explaining as a summary what double dispatch is , instead of leaving it for the conclusion,