A r t i c l e s
Navigation

Note: This site is
a bit older, personal views
may have changed.

M a i n P a g e

D i r e c t o r y

We See No Advantage in C Sharp Syntax


What a clutter mess - bringing in all the clutter from C++ and all the verbosity of Java. I go on the net looking for a simple hello world C# example, and people are actually giving examples such as these:

C Sharp Nonsense:

   public class ExampleClass
   {
       public static void Main()
       {
           System.Console.WriteLine("Hello, world!");
       }
   }
Or, maybe we could try it a different, just as dumb looking way:
using System;

namespace HelloNameSpace
{
      public class HelloWorld
      {
            static void Main(string[] args)
            {
                  Console.WriteLine("Hello World!");
            }
      }
}
Can't even a hello world just look reasonable, for once?

So I look more, and I finally found a hello world that is simpler. My question is why are there so many different complicated hello world examples in C# floating around the net - is it because hello world applications have to look complicated and stupid, just for the sake of, looking complicated and stupid?

Well, here is a simpler, yet still cluttered hello world in C# that I found:

using System;

public class HelloWorld
{
    public static void Main()
    {
        Console.WriteLine("Hello World!");
    }
}

Pascal Language:

   program hello;
   begin
     writeln('hello');
   end;
Who the hell thought up WriteLine when "WriteLn" is already well known and cleaner? Who the hell puts a system stdout function in a CLASS!

Excuse me, but I don't want to have to type System.Console.WriteLine every time I just want to spit something to stdout. I prefer OUTLN() or WRITELN() or PRINT()

Qompute Language:

   prog hello;
   b
     outln['hello'];
   e;

Yeah yeah.. save your breath.. I've heard all the excuses:

  • it don't matter the amount of keystrokes we doin' man, it more important that we had concepts placed in the program... the syntax and verbosity don't mutter, man
I've heard more excuses:
  • it don't matter what a hello world look like man, that is not any indication of what a large program will look like

Guess what - clutter doesn't help in small programs or large programs.

The amount of crap you have to put up with for a hello world can actually be a good indicator of the amount of crap you have to put up with to program every day prototypes. All new programs start out with small amounts of code. All modules start out with small amounts of code. If these small modules and small programs are all cluttered, what does this lead to? Bigger programs are composed of smaller amounts of cluttered code. It all adds up.

We'll see you in the hospital with arthritis and repetitive stress syndrome, C# programmers. Good luck to you.

Sorry that this article is negative - but we're sick and tired of languages with absolutely ludicrous syntax that don't offer anything useful than previous languages did.

Sure, C# is a nicer language to work with than C++ for many tasks BECAUSE C# HAS GOOD FRAMEWORKS, NOT BECAUSE C# HAS GOOD SYNTAX.

Syntax wise, C# could have done so much better. I'm purely bashing C# for its syntax in this article. Please understand that. I'm not bashing the power of C# frameworks and libraries!

The syntax of a language, believe it or not, plays a big role in how annoyed one can get after hours of dealing with and staring at code. Shift keys and verbose WriteLine's don't help - heck, people complained about Pascal's verbose WriteLn ! Here I am writing an article that shows Pascal is TERSER than C# ! Is that a hint?

If I switched my QWERTY keyboard to have bracket keys on the 9 and 0 keys to act as the primary keys instead of the numbers, I think LISP would be more appealing than C# - since at least Lisp wouldn't require very many shift keys and verbose clutter. I know Lisp hackers have been known for arthritis issues when they haven't switched their keyboard layout around - but now that I think about it, I think I'd rather program in lisp with a remapped keyboard than to use C#.

About
This site is about programming and other things.
_ _ _