|
![](/i/fill.gif) |
Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
> On Wed, 21 Jan 2009 21:17:56 +0100, Darren New <dne### [at] san rr com> wrote:
> >
> > You always could do it in Smalltalk, just like you do in Ruby. One
> > advantage C# has is that you're not *actually* changing the string
> > class; it's just syntactic sugar. It's more like a C++ friend, except
> > with method/object syntax.
> It is nothing like 'friend' in C++. As I understand it, extensions only
> have access to the public interface of the extended class. Semantically,
> they seem much more like ordinary free functions in C++.
Unless I'm missing something, I really fail to see how this is a
useful feature.
Basically, it seems, that instead of having to write, for example,
"someFunction(anObject)" you can write "anObject.someFunction()".
In other words, you simply can write the same thing with a slightly
different syntax, but otherwise there's no difference. I really fail
to see the usefulness of this.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |