Tim Moores wrote:Not if used in the main method. Since pointers are specifically required, this tongue-in-cheek approach would (hopefully obviously) not be the best approach.
Logan Cherry wrote:(Hint: You may NOT USE any 'if' statements.)
Adam Szewczyk wrote:Greetings,
I am trying to translate following java code into c++ code.
(...)
I do not understand what Configuration.DEBUG is doing. What is the c++ equivalent for it? Will omitting it affect " if then " performance significantly?
mark patindol wrote:
Al Sweigart wrote:Yes. In my opinion, Python is the most readable language I've encountered. Not to start a language war, but I would say it is generally more readable than JavaScript, Java, and Perl.
Al Sweigart wrote:My preference for C++ ternary operators is probably just an old habit. But I do like how it reads "this-condition, this-value-if-true, this-value-if-false" instead of Python's "this-value, if-this-condition-is-true, or-else-this-value-if-the-previous-condition-was-false"
Al Sweigart wrote:Anand's comments cover a lot of it.
Al Sweigart wrote:Though I wish the ternary operator was more like Java or C++.
Campbell Ritchie wrote:That I think is C++ code because of the bool keyword, not C.
Campbell Ritchie wrote:I presume the == and != operators are overloaded on Strings.
Campbell Ritchie wrote:I suspect the greatest overhead is in the format time function. What complexity does that run in?