Outparamdel: Difference between revisions

added general disc
(added general disc)
 
Line 1: Line 1:
[http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/ Blog entry].
Once FF is using [[exceptions]], <code>nsresult</code> methods become <code>void</code>-returning methods. Thus, methods with an "outparam" (more formally, a pointer-typed argument designated for passing a result out of the called method) will be able to place their result directly in the return value. This will make life easier for programmers and may save a few processor cycles.
 
This page describes the '''outparamdel''' refactoring tool. It hasn't been used yet because it can't really be done before exceptions. (Many getter methods always succeed, so we could technically apply outparamdel without exceptions, but it's risky because it assumes (a) the method will never be changed so that it can fail, and (b) the method isn't implemented in JavaScript. Neither assumption is safe.)
 
See also [http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/ Blog entry].




313

edits