David Bergman presented Groovy: Java++ by being Java– at Lab49 which inspired me to record this 7min video doing the same with C# and PowerShell.
Best viewed in IE.
Press Ctrl-Shift-G if you want to speed up the presentation.
Researching the optimal; implementing the practical
David Bergman presented Groovy: Java++ by being Java– at Lab49 which inspired me to record this 7min video doing the same with C# and PowerShell.
Best viewed in IE.
Press Ctrl-Shift-G if you want to speed up the presentation.
{ 2 trackbacks }
{ 5 comments… read them below or add one }
Url for the video is broken – has an extra period before “html”.
Even more PowerShelly:
“The total length of the names of the higher spirits is {0}” -f (“Luke”,”Daniel”,”David”,”Jesus” | Measure-Object Length -sum).sum
To make it fair to C# we gotta optimize it a bit as well:
static void Main(string[] args)
{
Console.Out.WriteLine(“Total count: {0}”, args.Aggregate(0, (total, arg) => total + arg.Length));
}
To make it fair to C# you use Sum
new[] { "joe", "john", "jeff", "jane" }.Sum(i => i.Length);@Jimmy. True
You still need to go through the compile and execute steps.