lambda-dev Digest, Vol 13, Issue 23
cleber at nightcoders.com.br
Thu Dec 23 15:13:54 PST 2010
I think both have their pros and cons...Defender methods seems really more
OOish, but I don't see how one will be able to override core libraries
anyway, except by inheriting the core classes.
Can't both strategies co-exist, so I can create my own extension methods for
the core classes?
I've been using C#/Linq for a while and, from a developer's perspective, I
think microsoft microsoft did it right by using a compiler-hack solution.
On Thu, Dec 23, 2010 at 6:00 PM, <lambda-dev-request at openjdk.java.net>wrote:
> Send lambda-dev mailing list submissions to
> lambda-dev at openjdk.java.net
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> lambda-dev-request at openjdk.java.net
> You can reach the person managing the list at
> lambda-dev-owner at openjdk.java.net
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lambda-dev digest..."
> Today's Topics:
> 1. RE: Readability (Howard Lovatt)
> 2. Error in compilation (Marcos Antonio)
> Message: 1
> Date: Thu, 23 Dec 2010 10:59:17 +1100
> From: Howard Lovatt <howard.lovatt at gmail.com>
> Subject: RE: Readability
> To: lambda-dev at openjdk.java.net
> <AANLkTinX2Rh5VvpxMRtj=i0M0h_+a7m=aJ3sJfWBoAHW at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> Hi All,
> I think that the proposed lambdas with extension methods are far
> superior to the C# alternative. In particular you can override the
> extension methods, e.g. an ArrayList might implement filter etc. quite
> differently than LinkedList. The builder alternative can also be
> optimised for a particular List type, but only for the List types you
> know about when you write the builder. The proposed Java approach is
> much more flexible, if I write my own List type I can override filter
> etc. if needed. Thus the proposed Java solution, which is a variation
> on Traits, fits into the OO paradigm much better than the alternative
> approaches (you would expect in an OO language to be able to write a
> List and that your list is treated the same as any other List).
> Have a great Christmas,
> ? -- Howard.
More information about the lambda-dev