C# vs. VB

Posted by Andrew on July 03, 2007

Rowan about C# vs. VB:

> None, if challenged, would be able to build anything using
> C# that Phil couldn’t build just as well in VB.

This isn’t the point. Different languages have different levels of expressiveness and also different aesthetics. A program written in Haskell may be 10 times shorter than the same program written in C++ for example [1].

Personally, I have two favourite languages: Ruby and Haskell :-)

In Ruby I can write this:

10.times { |i| puts i }

But in C# I have to write this:

for (int i = 0; i < 10; i++)
{
  Console.Write(i);
}

Which do you find more beautiful? :-)

1.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Tue, 03 Jul 2007 20:46:42 CDT

    Using C# 3.0 you could do something like this:

    5.Times( i => Console.WriteLine(i) );

  2. Tue, 03 Jul 2007 21:30:38 CDT

    James… that is exactly what I just wrote up…

  3. AndrewNo Gravatar Tue, 03 Jul 2007 22:34:57 CDT

    Yep, Lambdas are a good thing and I wonder sometimes why we had to go through the “delegate” syntax to get there.

  4. Wed, 04 Jul 2007 00:28:55 CDT

    php ftw:

    echo implode(range(1,10));

  5. Wed, 04 Jul 2007 00:32:52 CDT

    you could also one line your C#
    for (int i = 0; i

  6. Wed, 04 Jul 2007 16:52:57 CDT

    [...] Andrew from Mindscape makes the point that every different language has “different levels of expressiveness and also different aesthetics.” [...]

  7. anastasiosyalNo Gravatar Thu, 20 Dec 2007 05:44:24 CST

    Extension methods for a rubyish like library

Comments