3 ms·
C++ is a C-like language but C++ muddies up the difference between some operators due to operator overloading. This is an inconsistency. Do you support that? N
by gravypod 10y ago
C++ is a C-like language but C++ muddies up the difference between some operators due to operator overloading. This is an inconsistency.
Do you support that? No one will ever be able to convince me that "<<" and ">>" make sense to be read and write.
- __david__ 10y agoThat's not the same thing and you know it. C++ didn't just randomly change the associativity of one of the operators. PHP screwed up ternery in a way that makes zero sense (ie, it's wrong in 99.99999% of use cases). It still catches me (and my colleagues) off guard even though we have years of collective PHP experience.
- TheDong 10y agoIt doesn't matter, we're talking about php not C++. But yeah, "<<" and ">>" are at fairly internally consistent within C++ and don't generally confuse programmers or cause significant bugs in my experience, so I don't find them problematic. They did seem a bit weird at first, but they didn't cause significant problems. Perhaps they do for you, and I accept your complaint about those operators as valid actually, but it's on a whole different level of badness than php, and again, we're talking about php. Just because "other languages suck" doesn't mean php doesn't, so that's not a valid argument against anything I said.
- gravypod 10y agoI'm saying neither of them suck. They both have small things "Wrong" with them that are only "Wrong" because I don't like them. >they didn't cause significant problems That's not a valid criticism of any feature. I'd say that the worst feature of any programming language yet has been pre and post -- and ++. Some of the nastiest bugs I've seen have come from there. In both cases I avoid them. I only really use -- and ++ if I need to, just like ternary operators. > Just because "other languages suck" doesn't mean php doesn't, Ok what about other languages that are good? Python's ternary operator isn't the same as C-style languages but I still think of Python as being good.