Re: [AD] documenting minor return values

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On October 12, 2001 02:31 am, you wrote:
> > If return values are documented, that implies that we *should* be
> > checking them.  I'd rather not check `install_timer', etc.  Making
> > them return `void' might be considered breaking the API.
>
> I respectfully dissent (famous words): why does documenting them imply we
> should be checking them ? IMHO the only moral obligation we are under is to
> document the return value of a function that returns a value. Then it's up
> to the programmer to decide whether to check it or not.
>
> > Alternatively, we can say "The return value is unspecified.", which
> > is fine by me, but I'm sure some purists here would disagree ;-)
>
> Unspecified ? Could there be some quantum effects around ? ;-)

Sure! You can't know for sute what value is placed in a register unless
you check and collapse the quantum equation... (probably the wrong term :)

Or, "Does a tree falling in a forest make a sound if noone is around to hear 
it?"... 

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/