http://d.puremagic.com/issues/show_bug.cgi?id=11080
--- Comment #24 from monarchdo...@gmail.com 2013-09-23 05:06:46 PDT --- (In reply to comment #23) > (In reply to comment #22) > > > ...rules you wouldn't be able to apply to normal functions. For example an > > "enforce" that refuses array literals. Can't happen. > > > > Actually it's the other way around. Currently, assert is special. > > > > void enforce(bool b, string msg = "xxx") > > { > > } > > > > void main() > > { > > enforce("zzz"); > > } > > > > > > zunk.d(8): Error: function zunk.enforce (bool b, string msg = "xxx") is not > > callable using argument types (string) > > That's not the Phobos enforce. This is: I think his point was that enforce *could* be written to not accept string literals, countering my earlier point that "assert" would have a special "no-string-literals", which would not have been possible to implement with enforce. I don't think the example is relevant though, because this new enforce would *also* turn down: string s; enforce(s); Which assert would still support. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------