this std::cout << "hello world" bullshit is in no way intuitive. You’re using the bit-shift operator to output stuff to the console? WTF? Why 2 colons? What is cout? And then these guys go on to complain about JS being weird…
No, C is where it’s at: printf("hello world"); is just a function call, like all the other things you do in C.
For non-programmers (who most definitelly don’t know that >> and << are bit shift operators) shoving something into something else is more intuitive than “calling a function with parameters”.
Also don’t get me started on the unintuitiveness of first passing a string were text is mixed with funny codes sgnaling the places were values are going to be placed, with the values passed afterwards, as opposed to just “shove some text into stdout, then shove a value into stdout, then shove some more text into it”.
Absolutelly, once you are used to it, the “template” style of printf makes sense (plus is naturally well-suited for reuse), but when first exposed to it people don’t really have any real life parallels of stituations were one first makes the final picture but leaving some holes in it and later fills-in the holes with actual values - because in real life one typically does it all at once, at most by incremental composition such as in C++, not by templating - so that style is not intuitive.
C is no beginner heaven either, printf is its own can of “why can this function have any number of arguments and why does the compiler have to complain about the formatting every 25 milliseconds” worms
this
std::cout << "hello world"
bullshit is in no way intuitive. You’re using the bit-shift operator to output stuff to the console? WTF? Why 2 colons? What is cout? And then these guys go on to complain about JS being weird…No, C is where it’s at:
printf("hello world");
is just a function call, like all the other things you do in C.For non-programmers (who most definitelly don’t know that >> and << are bit shift operators) shoving something into something else is more intuitive than “calling a function with parameters”.
Also don’t get me started on the unintuitiveness of first passing a string were text is mixed with funny codes sgnaling the places were values are going to be placed, with the values passed afterwards, as opposed to just “shove some text into stdout, then shove a value into stdout, then shove some more text into it”.
Absolutelly, once you are used to it, the “template” style of printf makes sense (plus is naturally well-suited for reuse), but when first exposed to it people don’t really have any real life parallels of stituations were one first makes the final picture but leaving some holes in it and later fills-in the holes with actual values - because in real life one typically does it all at once, at most by incremental composition such as in C++, not by templating - so that style is not intuitive.
C is no beginner heaven either,
printf
is its own can of “why can this function have any number of arguments and why does the compiler have to complain about the formatting every 25 milliseconds” worms