Re: Is Ruby On Rails, Delphi's lost cousing?
- From: "Paul Nichols (TeamB)" <paul@xxxxxxxx>
- Date: Thu, 18 May 2006 09:23:43 -0400
Barry Kelly wrote:
"Paul Nichols (TeamB)" <paul@xxxxxxxx> wrote:You can do the same with Java using inner classes and reflection and
C# is nothing more than a Java clone.
Begging your pardon, but I've programmed for several years in both
languages and I far prefer C# - especially C# 2.0, with anonymous
delegates. The closest analogue in Java is anonymous classes, but they
don't capture variables in the same way (i.e. no non-final values
captured) and they end up more verbose. Delegates as a first-class
language feature alone makes me happier using it.
introspection. In fact, I have a library that gives me the same
functionality. No biggie.
There are things you get with this first-class support like covarianceI would agree. Java Mustang does have some of this same functionality.
of return type and contravariance of parameter types in implicit
conversions of method groups to delegate-typed values that you don't get
easily using something analogous in Java that works with classes
instead.
d parameters, has fundamentally changed the way I program.
Another thing is the synergy between iterators, generics and foreach.
One can find all kinds of imaginative uses for IEnumerable<T> that don't
involve collections, given how easy it is to implement IEnumerable<T> -
you don't even have to write a class. This can bring functional language
ideas in. For example, given an IEnumerator<char> e, I've written some
things:
---8<---
Algo.SkipWhile(e, char.IsDigit);
// ...
Algo.SkipWhile(e, Algo.Not(Algo.Equals('\n')));
--->8---
Where Algo.Not and Algo.Equals return values of type Predicate<T>.
Look at Java 1.5. This type of functionality is available in Java. The
enhanced for loop takes care of a lot of these considerations.
Autoboxing takes care of many of these differences as well.
.
- Follow-Ups:
- Re: Is Ruby On Rails, Delphi's lost cousing?
- From: Barry Kelly
- Re: Is Ruby On Rails, Delphi's lost cousing?
- References:
- Is Ruby On Rails, Delphi's lost cousing?
- From: Gbenga Abimbola
- Re: Is Ruby On Rails, Delphi's lost cousing?
- From: Paul Nichols (TeamB)
- Re: Is Ruby On Rails, Delphi's lost cousing?
- From: Barry Kelly
- Is Ruby On Rails, Delphi's lost cousing?
- Prev by Date: Re: DevCo New Company Name
- Next by Date: Re: What could I do?
- Previous by thread: Re: Is Ruby On Rails, Delphi's lost cousing?
- Next by thread: Re: Is Ruby On Rails, Delphi's lost cousing?
- Index(es):
Relevant Pages
|