http://d.puremagic.com/issues/show_bug.cgi?id=11080
Maxim Fomin <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #18 from Maxim Fomin <[email protected]> 2013-09-21 14:33:12 PDT --- (In reply to comment #15) > > Why is it a bug? > > I think that the argument is that no one would ever want to assert than an > array literal is true, because it's a given that it is. And if it's never > something that programmers are going to want to do, and there's significant > risk in doing that instead of assert(cond, "msg"); then it should be banned in > order to avoid that particular mistake. > > That being said, I don't think that it's worth adding a special case to the > compiler for this. We should avoid special casing stuff as much as we > reasonably can, and I don't think that this problem is anywhere near big > enough > to merit one. I assume that Temtaime ran into this problem, because (s)he > reported it, but I have never run into it - either in my own code or in anyone > else's code - and I've never even heard of anyone running it before this. So, > while clearly it has caused a problem for at least one person, I seriously > question that it's much of a problem in general. Worst case, it sounds like > the > sort of thing that should be solved by a lint-like tool. I think this is not a big deal to add such 'special rule' as it clearly adds value to the language - discussed case is always a bug and nothing should be hurt by such special case. I reopen issue (by the way, marking it as invalid is wrong - there is wontfix for purposes you wish). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
