The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
That certainly is not the case with British cars. Is there any left-side-driving country big enough, and with enough cars, to justify cars of a different construction? Well, India is most certainly big enough, but I'd be very surprised if they do it different from the British! They were part of the UK up until 1947, long after the arrival of car driving.
I drive in India and if you have been here, you would know that following rules and thinking of safety is absolutely optional here.
Which is kind of secure in itself, because as you know that it is wild, then you pay a lot of attention.
If you drive in germany, people would not pay attention while following the rules and then complain because you did not do whatever the rule is.
One thing that helps me when switching is... always drive a local car, that means with the wheel in the same side than the others... then just think one thing:
- The danger is on the driver side.
- The fast line is the one on the driver side.
- The cars in the other direction are on the side of the driver.
- The dangerous turn is the one to the side of the driver (where you have to give way, pay attention to coming cars...)
The worst thing IMO is to drive your own car in a country where people drive on the other side.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
If you accidentally go to the passenger door, instead of the driver door, open it an sit in there for a little while like that was your intention all along. Tilting the seat back and pulling out a paperback to read makes it more believable.
Any 20 years old code base saw its sharse of clowns, especially the self-taught enthusiast that follow any "guru" blindly.
I had such a colleague, luckily he went out slamming the door... unfortunately he had 10 years to make damages. I recently had to update some of his code and I was happy that he was no longer in my proxymity or I would be writing this from behind bars.
I have come across some right howlers in this code base.
Anyway, C++, of all the languages I have used, from ADA, to Prolog, through VB and Java, allows this kind of sillyness. So it is for that that I condemn it.
And personally I dont see that OO is a massive benefit over a procedural language except in specific instances. And in fact it is often worse. Particularly in control code, code that is not data centric, but process centric.
I beg to differ, there are always pieces of information in a process which are data-centric, and applying OO correctly will break up processes in subprocess objects that are easier to isolate, replicate, store, observe and even parallelize.
I do intermix procedural and OO because pure OOP more often than not introduces complexity trying to fit square pegs in round holes, but that's precisely why I like C++ and not the oter OOP languages: it's C, but with 100% OO support.
More like never, I concur. Drivers, firmware and heavy computing procedures get no benefit and mostly troubles at all from an internal OO implementation. As consumers of OOP (object as parameters), or external implementation (i.e. the driver is encapsulated in an object) they might get some benefits though.
And have you, personally, built a million-line code-base in purely procedural code? In C, perhaps? If you have done so, and have done the same using an object-oriented language, then you have standing to dismiss object oriented programming as no better than procedural.
Merely asserting that it is possible is not a very strong claim. Pointing to 30-year-old code like the Windows Kernel, that was developed before the broad availability of OO languages is meaningless.
While I agree with your statement, std::map implements this very  operator overload as described. Actually that comment is a nice addition. Would I implement something like that though? probably not.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
C++ is as sensible or as stupid and daft as you want it to be.
Unfortunately not helped by the C++ ISO bods adding more and more different ways to make it more complicated without adding very much to real C++ users. The idea of less is more is lost on them.
Could do with minimum C++ with a lot of the bad and new stuff removed.
As for the Template library - great functionality but let down by the ludicrous syntax etc.
Yes, I still keep the AT&T C++ book on my desk. A slim volume describing a nice language which was an (IMO) elegant OO extension to 'C'.
Now you can look at valid C++ syntax that looks like a cat walked across the keyboard. They seem to be trying to put every feature of every other language into C++ syntax and comprehensibility be damned.