std.unittests for (final?) review

"Jérôme M. Berger" jeberger at free.fr
Sun Jan 9 00:44:01 PST 2011


Jim wrote:
> I have to agree.
> 
> assert(1 + 1 < 3);
> 
> will always be easier to read than any:
> 
> assertPred!"a < b"(1 + 1, 3);
> 
> Why not just keep it simple and straight forward? Anything expressed in the latter form can be expressed in the former.

	True, but on the other hand:

Assertion failed!

will always be less informative than any:

Assertion failed: 3 < 2!

	It all depends on whether your priority is code or message
readability. I would tend to give priority to the error message.

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110109/9a21f97d/attachment.pgp>


More information about the Digitalmars-d mailing list