Hello world!
The classic programmer’s getting-your-feet-wet program…I’ve done at least a dozen different Hello Worlds. Honestly, I wasn’t expecting this to be too difficult…a single print command should have done the trick. Basically, that was it. But the part that really stuck out at me was the aesthetic complexity of that simple program.
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("Hello, World!"); } } }
Ugh. Four whole lines of boilerplate header stuff, and then three levels of nesting for one simple program…? Granted, a lot of this stuff is redundant. But still, there’s a lot going on here. It’s just harder to deal with than Obj-C.
What really bugs me here is the capitalization though. Foundation and Cocoa used a nice capitalization standard, which is noticeably different from here. And since when is
main()
written as
Main()
(with the capital M)? It’s a little syntactical thing, but it bugs me.
Ah well. Guess I’ll get used to it eventually.