|
|
|
|
|
by WorldWideWayne
3974 days ago
|
|
Sure, C# has a terrible learning curve because you'd have to type `Console.WriteLine("Hello World")` instead of `puts 'Hello World'`. `Console.WriteLine` is also totally unclear as to what it does compared to `puts`, which basically says exactly what it does. /s |
|
In Ruby, `puts "Hello World"` and you're done. The most you have to explain is puts and string literals.
In C#, you have to create a class with a static main method. You're then left to choose between explaining classes and methods ("what's static? what's void?"), or skipping that and just treating them as the magic incantation for running a program. Pedagogically, neither is satisfactory.
Ruby wins the Hello World simplicity contest, hands down. The question is whether the long-term benefits of C#'s program structure are worth the increased overhead in the Hello World experience.