From: Bill D. <de...@se...> - 2006-03-22 12:52:34
|
On Wed, 22 Mar 2006, Michael Creel wrote: > Hello all, > I'm planning on converting the existing bfgsmin (source bfgsmin.cc) to a new > function __bfgsmin (source __bfgsmin.cc), and writing a user frontend > bfgsmin.m. A couple of questions What is the benefit of doing this? > 1) All input checking will be in the .m file frontend. Thus, it will be > possible to crash octave by directly calling __bfgsmin with bad > arguments. Is that acceptable? My personal opinion is that every function should do full error checking of its arguements. I know that people are writing web front-ends to octave, and that could lead to dangerous code. The way that I view this is that some day, someone will call __bfgsmin and get an error and complain about it. Then we'll have to add the arguement checking anyway, so it should just be added from the beginning. Bill -- "The history of liberty is a history of the limitation of government power, not the increase of it." -- Woodrow Wilson |