| bio | website | automaton2000.com |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 8 months |
| seen | Feb 28 at 12:45 | |
| stats | profile views | 1 |
|
Feb 28 |
awarded | Caucus |
|
Mar 6 |
awarded | Yearling |
|
Feb 1 |
awarded | Nice Answer |
|
Dec 24 |
awarded | Quorum |
|
Oct 19 |
comment |
Make a big deal out of == true? ugh, you're right. Not any. But ints do work e.g. Mh, so my argument isn't as strong as I thought. |
|
Oct 19 |
comment |
Make a big deal out of == true? "in many cases". Yes, you are right. Renaming is fine, too. With "if (QWidget::acceptDrops() == true)" you don't have the possibility to rename. perhaps it would be good to name it doesAcceptDrops() ... It's too much of a hassle (and it's impossible to be consistent using that omission-rule in any API), so being consistent with other "== whatever"-ifs, I strongly suggest not omitting it, so it doesn't "look" different, thus looks consistent. |
|
Oct 19 |
awarded | Teacher |
|
Oct 19 |
comment |
Make a big deal out of == true? @Guffa but this can happen with any type. Solving it for bools, doesn't solve anything. |
|
Oct 19 |
comment |
Make a big deal out of == true? It is not a bad thing. Code that reads like real text is far better, than implicit foo. Keep that habit for the sake of readability. |
|
Oct 19 |
comment |
Make a big deal out of == true? It's about readability, not illogic or (micro)-redundancy |
|
Oct 19 |
comment |
Make a big deal out of == true? @Guffa Cam is very right. This is not a reason to stop using == (anyType) in if blocks. |
|
Oct 19 |
comment |
Make a big deal out of == true? I agree, it is all about readability. If variables are named well, you don't need it. If the expression reads better with it I'd go for "== true", also it is consistent if you use "== false" instead of (the ugly) "if (!())". |
|
Oct 19 |
awarded | Supporter |
|
Oct 19 |
answered | Make a big deal out of == true? |
|
Oct 27 |
answered | What is the best way to discern an excellent programmer in a job interview? |