[Pharo-project] RBNodes accept vs. visit
Hi everyone, I just had a quick look at the RBNodes. Is there a particular reason why the visitor pattern methods are prefixed on both sides with 'accept'? eg. RBArrayNode >> acceptVisitor: aProgramNodeVisitor ^ aProgramNodeVisitor acceptArrayNode: self camillo
Indeed, this is really confusing :). I am not aware of any particular reason. Doru On 23 Aug 2011, at 15:33, Camillo Bruni wrote:
Hi everyone,
I just had a quick look at the RBNodes. Is there a particular reason why the visitor pattern methods are prefixed on both sides with 'accept'?
eg.
RBArrayNode >> acceptVisitor: aProgramNodeVisitor ^ aProgramNodeVisitor acceptArrayNode: self
camillo
-- www.tudorgirba.com "There are no old things, there are only old ways of looking at them."
Legacy, and because it really doesn't matter of how you name your double-dispatch methods as long as you do it consistently within your realm. Lukas On 23 August 2011 15:40, Tudor Girba <tudor@tudorgirba.com> wrote:
Indeed, this is really confusing :). I am not aware of any particular reason.
Doru
On 23 Aug 2011, at 15:33, Camillo Bruni wrote:
Hi everyone,
I just had a quick look at the RBNodes. Is there a particular reason why the visitor pattern methods are prefixed on both sides with 'accept'?
eg.
RBArrayNode >> acceptVisitor: aProgramNodeVisitor    ^ aProgramNodeVisitor acceptArrayNode: self
camillo
-- www.tudorgirba.com
"There are no old things, there are only old ways of looking at them."
-- Lukas Renggli www.lukas-renggli.ch
It is consistent so I don't care too much :D just curious ;) On 2011-08-23, at 15:42, Lukas Renggli wrote:
Legacy, and because it really doesn't matter of how you name your double-dispatch methods as long as you do it consistently within your realm.
Lukas
On 23 August 2011 15:40, Tudor Girba <tudor@tudorgirba.com> wrote:
Indeed, this is really confusing :). I am not aware of any particular reason.
Doru
On 23 Aug 2011, at 15:33, Camillo Bruni wrote:
Hi everyone,
I just had a quick look at the RBNodes. Is there a particular reason why the visitor pattern methods are prefixed on both sides with 'accept'?
eg.
RBArrayNode >> acceptVisitor: aProgramNodeVisitor ^ aProgramNodeVisitor acceptArrayNode: self
camillo
-- www.tudorgirba.com
"There are no old things, there are only old ways of looking at them."
-- Lukas Renggli www.lukas-renggli.ch
I would love to change that because this is terribly confusing for me that the accept: and visit: methods are not well named. stef On Aug 23, 2011, at 2:33 PM, Camillo Bruni wrote:
Hi everyone,
I just had a quick look at the RBNodes. Is there a particular reason why the visitor pattern methods are prefixed on both sides with 'accept'?
eg.
RBArrayNode >> acceptVisitor: aProgramNodeVisitor ^ aProgramNodeVisitor acceptArrayNode: self
camillo
participants (4)
-
Camillo Bruni -
Lukas Renggli -
Stéphane Ducasse -
Tudor Girba