> Maybe we're drifting towards an OO vs Functional rift in this conversation...
And towards scala-debate. I meant to do that on my last post.
> If you want to do the /same thing/ to several different objects, you can either
>
> [OO-] imbue the various objects with the ability to do that thing ,
> which is easiest to do via traits & mixin composition
The disadvantage to this is that the ability to do that thing might
only be desired within a certain scope. Implicit conversions let you
add the ability without making it available to code that doesn't
import the conversion, and they work against objects not created by
the code that requires that ability, e.g., Strings.
> [Functional-] define functions independently of the target objects,
> and expose their data via some generic form.
There's nothing to stop a value containing a function, if that makes
more sense for a case.
> Lets get specific. The use-case the started this off was a desire to
> define a specialized form of ordering over homogeneous containers of
> ordered items (basically, vectors).
See Ordering in 2.8.
> To me, that just doesnt seem as nice. Maybe Im simply OO brainwashed...
You're assuming that functions have to be standalone. Ordering is
basically a group of functions given a name. It seems a good example
to me.
--
Ricky Clarkson
Java and Scala Programmer, AD Holdings
+44 1565 770804
Skype: ricky_clarkson
Google Talk:
ricky.clarkson@...
Google Wave:
ricky.clarkson@...