LONG Re: Suggestion: "fix" assert(obj)
Tristam MacDonald
swiftcoder at gmail.com
Fri Jun 15 16:18:24 PDT 2007
Actually, I would expect it to be a no-op, since the fewer conditions that must be satisfied, the less likely the assert is to fail. Think of a nullary logic ops in scheme, etc. (and, or)...
Georg Wrede Wrote:
> What would your reaction be if you find the following line inside a method?
>
> assert();
>
> What's the first thought? Apart from that it must cause a compiler error
> since there's no expression at all. What would you expect it to do? If I
> told you we've fixed gdc so that an empty assert within a method causes
> immediate assertion of the current instance's consistency, would you
> approve?
More information about the Digitalmars-d
mailing list