if(condition) { int some_damn_thing_i_only_care_about_in_this_case = expensive(); do_thing(…); } else { whatevs(); }
-
-
Replying to @chaosprime
so, you save 32/64 bits, at the cost of extra typing and the possibility that future readers of your code will misunderstand it?
2 replies 0 retweets 0 likes -
Replying to @ColumPaget
hunh? what extra typing? tbqf i went from all-declared-at-top to declared-and-initted-where-needed years ago & its way better
2 replies 0 retweets 0 likes -
Replying to @chaosprime @ColumPaget
much more readable and less boilerplatey, and if you hate unused variable warnings you'll almost never see one
2 replies 0 retweets 0 likes -
Replying to @chaosprime
well, I once knew a c++ dev who lost a days work because used the for (int x=0; x < y; x++) { } syntax, and then later used x..
1 reply 0 retweets 1 like -
Replying to @ColumPaget
lol noob. i mean i made the same mistake like two days ago but it cost me probably 90 seconds
4 replies 0 retweets 0 likes -
Replying to @chaosprime
90 seconds that you'll never get back! This is what happens when you stray from the path of pure C!
1 reply 0 retweets 1 like -
Replying to @ColumPaget
oh well the loop was probably in PHPpic.twitter.com/j6cR9DEYmP
1 reply 0 retweets 0 likes -
Replying to @chaosprime
you're dealing in PHP? How can you live with yourself? Haven't you seen what that shit does to websites?
1 reply 0 retweets 0 likes -
Replying to @ColumPaget
dude i got yelled at by oldbies on a PHP forum for telling ppl not to give noobs snippets that were vulnerable to SQL injection
2 replies 1 retweet 1 like
you ain't gotta tell me it's a wretched hive of scum and villainy. i guess i justify myself in terms of harm reduction
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.