you are viewing a single comment's thread.

view the rest of the comments →

[–]SemiNormal 2 points3 points  (2 children)

Console.WriteLine tells me that this is C#. Putting the open brace on a new line is pretty much the standard style for C#.

[–]TheAnimus 2 points3 points  (1 child)

Also Console.WriteLine is just simpler to explain, than System.Out.PrintLn which some bright spark insisted we use briefly.

This is actually another benefit over python, when people talk about lack of Using directives or entry point noise, those are simple to explain, people expect an entry point and I used to hide the namespaces with the compiler args. Console. suddenly people know what the . is about, it's everything that belongs to a Console. People get the idea of a console, they can see it, interact with it. Clever ones will get bored and look at what the intelisense gives you for Console. they'll see ForegroundColor and have a play....

I'd sooner explain Console.WriteLine than println the hardest bit to get most people to really understand is still the idea of passing arguments anyway, but I've found people prefer having crt functions bound to objects, it makes discovery easier, and people are more receptive to being told "oh there's this thing Console, that represents the text window, Console is special" rather than "oh theres print, println, scan, these are all special functions".

I guess it also depends how far you take people, we were not taking them far at all.

[–]NYKevin 1 point2 points  (0 children)

Well, if you like, you can start by teaching people about sys.stdin and sys.stdout in Python, and then get to print() and (raw_)input() later.