Archives by date

You are browsing the site archives by date.

C# – Revisiting Lambda expressions – II

In the previous post, we saw that the Lambda expressions can be used as a shortcut to function pointers. A method that accepts a lambda expression as a parameter is equivalent to a method that accepts a function as a […]

C#- Revisiting Lambda Expressions

Though plenty of articles have been written about Lambda expressions in C#, still feel most of the developers continue to build .NET applications using C# 1.0. I had an opportunity to discuss lambda expressions with a group of developers. We […]

Groovy-Closure with variable number of arguments

Last week somebody tossed up a question of using variable number of arguments with Groovy. We’re implementing a method called ‘add‘ in the String class using meta-programming. The add method should just append any number of string arguments passed to […]

Groovy/Java ArrayList code comparison

Given below is the code to create a simple ArrayList in Java and it’s equivalent in Groovy. //Code in Java ArrayList<String> countries = new ArrayList<String>(); countries.add("India"); countries.add("France"); countries.add("Spain"); System.out.println(countries.getClass().getName());//Prints java.util.ArrayList for(int i=0;i<countries.size();i++){ System.out.println(countries.get(i)); } The Groovy equivalent of the same. […]

Interesting read about Spring Framework 4.0

Groovy/Grails has really spoiled developers like us. Working in Java with core Spring libraries seems to be a bitter pill these days. Though we can configure Groovy classes as beans in Spring it only looks like a plugin in the […]