[prev in list] [next in list] [prev in thread] [next in thread]
List: wikitech-l
Subject: [Wikitech-l] RFC: assertion of pre- and postconditions
From: Daniel Kinzler <daniel () brightbyte ! de>
Date: 2014-01-24 23:57:04
Message-ID: 52E2FDD0.4070802 () brightbyte ! de
[Download RAW message or body]
RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Assert
This is a proposal for providing an alternative to PHP's assert() that allows
for an simple and reliable way to check preconditions and postconditions in
MediaWiki code.
The background of this proposal is the reoccurring discussions about whether
PHP's assert() can and should be used in MediaWiki code. Two relevant threads:
http://www.gossamer-threads.com/lists/wiki/wikitech/275737
http://www.gossamer-threads.com/lists/wiki/wikitech/378676
The outcome appears to be that
assertions are generally a good way to improve code quality
but PHP's assert() is broken by design
Following a suggestion by Tim Starling, I propose to create our own functions
for assertions.
-- daniel
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic