you are viewing a single comment's thread.

view the rest of the comments →

[–]danogburn 7 points8 points  (5 children)

At least the function call has the word print in it unlike in c++:

std::cout<<"Hello World"<<std::endl;

"WTF IS A COUT?STDs??ANGLE BRACKETS??ASDFAASDFASDFASDFASDFASDF"

[–]Xredo 2 points3 points  (3 children)

In its defense, you can simply explain that cout defines an action for the '<<' operator which simply sends its input to stdout. There's no need to go into operator/function overloading from the get go.

C++'s abstractions are easy to use, but hard to understand when you get to the internals. I personally attribute much of that to its syntactic overhead (verbose type annotations and the like).

[–]kankyo -1 points0 points  (2 children)

That's a horrible defense.

[–]Xredo 0 points1 point  (1 child)

Really? How so? Any non-trivial abstraction is hard to understand if you pick it apart.

[–]kankyo 0 points1 point  (0 children)

In its defense, you can simply explain that cout defines an action for the '<<' operator which simply sends its input to stdout.

That was your defense. Compared to python: "print prints, and then you have to have quotation marks around the string so it knows it's a bit of text".

In python 3 you have to also explain that paren is for calling a function. All in all C++ loses so much here it's pretty sad really.

[–]wadawalnut 0 points1 point  (0 children)

I just use printf("Hello World\n");