[Haskell-cafe] Re: What I wish someone had told

John Lato jwlato at gmail.com
Fri Oct 17 12:57:32 EDT 2008


Richard O'Keefe wrote:
> On 17 Oct 2008, at 9:53 am, Daryoush Mehrtash wrote:
>
>> So does this mean that the reason for complexity of generics is the
>> Java inheritance?
>
> No.  The reason for the complexity of generics in Java is that
> they weren't designed into the language in the first place.
> It took several attempts and quite a lot of work to come up with
> a version of generics that was 100% interoperable with earlier
> JVMs *and* still worth having.
>
> You could have something very like Java generics but without
> the strangeness if you designed it into the language from the
> beginning, as Betrand Meyer did with Eiffel.  Of course, what
> _he_ didn't design in from the beginning was lambdas, now
> present as "agents".  Eiffel has its own kinds of strangeness.
>

Or C# generics, which are built into the IL (in .Net 2.0 and above).
In many ways, C# is a very nice language, and having generics fully
supported in reflection is pretty cool.  I do have some words to say
about various ASP.Net libraries, however...


More information about the Haskell-Cafe mailing list