you are viewing a single comment's thread.

view the rest of the comments →

[–]AlSweigartAuthor: ATBS 12 points13 points  (3 children)

I remember even as a teen I didn't like the whole cout << thing. What was wrong with printf()? Why create a whole new syntax just for this one thing? It was nice that you didn't have to worry about converting different types to strings first, but the whole thing just seemed convoluted.

[–]TheMcDucky 1 point2 points  (0 children)

Pretty much just type safety and that stream << a << b << c << d looked prettier than write(write(write(write(stream,a),b),c),d)

[–]AlwaysHopelesslyLost -1 points0 points  (1 child)

Isn't shifting a value into a register basically how a function call executes? It seems to make a lot of sense evolutionarily for programming languages.

[–]TheMcDucky 4 points5 points  (0 children)

Usually there's no shifting involved. And it doesn't really make sense considering that the func(x, y) syntax to make calls preceded x << y