DEV Community

Discussion on: I Think I Overestimated How Hard C++ is.

 
seanolad profile image
Sean • Edited

Okay... that was long as HELL. I get what you're saying but all the points you made are still opinion based, or incorrect. The reason why l different languages were developed was not really out of necessity to be readable than it is to be time efficient. People can't read 0's and 1's as quickly as english or any other language for that matter. Usage of the goto statement over and over, or over huge spans of code is just as inefficient as many different loops and if statements. An experienced developer would work around that. Yes, using the do... while loop is favoured, but that doesn't mean usage the goto statement is dangerous. The whole point of having multiple methods to achieve the same outcome is to allow for different styles. Suggesting that any coding style that reaches outside of the standard scope is a "very bad attitude" is just genuine stupidity. True, readability is recommended in more than one community, but code that is readable is often not optimized, and no offence to those who don't agree, but that's kind of the trump card of c++, optimization. Now before you start talking about how optimized code is more difficult to debug, I respect your opinion, but I just DON'T agree. If I take devil's advocate and look at it from your perspective, yes readability is important, yes there are other more readable methods in c++, yes it's easier for others if you use readable methods, AND YET there is still a HUGE thing you completely overlooked. COMMENTS, they are LITERALLY there for EXACTLY what we're talking about. READABILITY. Understanding the code someone writes is hella easier with comments. If you write ANY code with the intention to return to it down the road you should use comments. Your code DOESN'T even have to be a little bit readable, if you put comments at every stage in your code you will be refreshed enough to understand what is going on, and a third party would too. I've said all I have to say, good day.