Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In Progress - Incomplete

One aspect of Groovy ( and Ruby, Python , etc ) I really like is the combination of closures and support for them in the Groovy DK .

As an example, consider iterating through every line in a text file :


Very elegant and easy on the old eyes.


Oh dear.

Java with some help

and the supporting code :


Apologies for my C#, I have not been writing it for very long...

No need to escape path string is nice

C# 2.0 with some help

With C# 2.0 and the 2.0 .NET framework the addition of anonymous delegates we can produce a very concise and readable solution

similar in elegance to the Groovy one.

This depends on the following utility class

You will notice that I have started implementing the Groovy DK set of collection iterators (each, findAll, find , etc ) for C# 2.0.
By the time it's out, I will have groovinated it dude.

I do wish Microsoft and Sun would have built this kind of simplicity in....

  • No labels