Hi Gilles,

2012/11/27 Gilles Sadowski <gil...@harfang.homelinux.org>

> Hi.
>
> > > [...]
> > > >
> > > > Is "ebeDivide" a (mathematical) "vector" operation?
> > > > IMHO, it's an operation on 2 lists of values.
> > > >
> > >
> > I agree, but it's still useful to have it on vectors... But I'm happy
> with
> > map.
>
> Sorry, I've just implemented the MathArrays option.
> We can always add that in 3.2, but it would need further thought to be sure
> that we cannot come with a better alternative, as part of the overall
> cleanup...
>
> MathArrays is a good option. I just meant that map would be interesting on
top of that (for vectors which might not be array based). I agree, it needs
further thought.
Contrary to what I was satying previously, the visitor pattern might still
be a worthy option, since it allows nive idioms like
v.walkInXxxOrder(EbeMultiply.by(w)),
where EbeMultiply would be the class of the visitor, and EbeMultiply.by a
factory method which keeps a reference to w. I've implemented that locally,
it reads quite well. The downside is that the visitor keeps a local copy of
w.

Sébastien

Reply via email to