tag:blogger.com,1999:blog-3870801931584460413.post63412391932808543..comments2024-01-03T11:08:42.595-08:00Comments on On Software and Languages: Coding styles.Marek Krjhttp://www.blogger.com/profile/16877868679118775297noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3870801931584460413.post-82695181692030800792013-06-16T23:32:12.571-07:002013-06-16T23:32:12.571-07:00@Anonymous
Yes, in principle you are right. But pe...@Anonymous<br />Yes, in principle you are right. But personally I'd rely on the compiler to optimize such cases. Yes, I know, you shouldn't set your bets on the compiler, but I opt more for the readability than for micro-optimizations. Maybe I'm not in the "spirit of C(++)", or maybe it's just old habits, but writing int i = 1 pleases me more than int i(1) - it just looks more C-ish. On the other hand the post says that this all doesn't matter ;)Marek Krjhttps://www.blogger.com/profile/16877868679118775297noreply@blogger.comtag:blogger.com,1999:blog-3870801931584460413.post-62790870490733186012013-06-15T22:30:36.394-07:002013-06-15T22:30:36.394-07:00I'm a Lisp programmer, not a C++ programmer, b...I'm a Lisp programmer, not a C++ programmer, but isn't your mate's version potentially more efficient?<br /><br />My (decade-old) knowledge of C++ is that "Classname varname(arg);" calls an initializer (?), while "Classname varname = arg;" calls an initializer and then calls operator=.<br /><br />Anonymousnoreply@blogger.com