On Tue, Oct 8, 2019, 20:48 Stanislav Malyshev <smalys...@gmail.com> wrote:
> Hi! > > > I was going to learn c++, but then I came across these weird operators > >>> and <<. At first I thought they were heredoc, but, that obviously > > wasn't the case. My next guess is that they were some sort of strict > > comparison === is more strict than ==, so I figured >> is more strict > > than >. That wasn't the case either. After wondering for a while what it > > could be, I decided to look it up. It ends up that you use it to output > > text. cout << "Hello World"; It was SO confusing, because they also have > > printf which can be used to output text. I decided that c++ is obviously > > a garbage language and gave up. Not sure why anyone would ever use it! > > Actually since you can use fopen(stdout)+fwrite for outputting text, all > other ways of outputting text should be deprecated too. Including > printf, which is super-confusing with all its formats - why would I need > any of that, and string interpolation too, when I could just compose a > string out of bytes and fwrite it to the stdout? Very confusing. I am > preparing an RFC right now to deprecate all functions that produce any > output except fwrite. My next RFC will be about deprecating all database > extensions because obviously fsockopen+fread+fwrite already covers them > all. > One is function (arguably routine) composition, the other is a custom syntax (operator?) that very much breaks the principle of least possible astonishment. It is normal that people get confused by different ways of doing the same thing, where those ways require non-homogeneous syntax and obscure features. The best results in code quality in the PHP OSS ecosystem over the past few years have been around limiting what the language can do (types, code styles that reduce the language feature-set), not widening it. Also, I would miss a backtick during a code review, and there would most certainly be trouble, and I do dozens of code review a day. I'd be astonished: funny. >