I know this list isn't really for linking stuff, but I found this article earlier today:
http://zenol.fr/site/2013/08/27/an-alternative-error-handling-strategy-for-c...
It's about C++, but what it describes is very relevant to our error handling since we use the exact same pattern (via the Status class) except in PHP.
Right now MediaWiki is a big mix of the three patterns: sometimes functions return false on error, sometimes they throw exceptions, and sometimes they return a Status object with error info. *-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Tue, Aug 27, 2013 at 2:48 PM, Tyler Romeo tylerromeo@gmail.com wrote:
I know this list isn't really for linking stuff, but I found this article earlier today:
http://zenol.fr/site/2013/08/27/an-alternative-error-handling-strategy-for-c...
It's about C++, but what it describes is very relevant to our error handling since we use the exact same pattern (via the Status class) except in PHP.
I have to admin that I skimmed the article but I don't believe we use the pattern that he describes. It looks like he's advocating using an error monad. That'd bring our error handling pattern count up to 4. All we'd need next is promises! Seriously though, either data structure could be useful for us but we'd want to weigh the extra brain space required to use them. And the impedance between those structures and traditional error handling. And the performance....
Nik
wikitech-l@lists.wikimedia.org