Re: Cases where Forth seems a little clunky
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.forth Profile…
 Up
Re: Cases where Forth seems a little clunky         


Author: John Doty
Date: May 20, 2007 16:04

Andreas Kochenburger wrote:
> John Doty wrote:
>> An advantage of having a flag register separate from the stack is that
>> every word gets a "side channel" to communicate success or failure
>> through. This eliminates most of the need for special magic return
>> values.
>
> When you feed an "errno" register with every word,

Not an errno, just a one bit flag. So I can say things like:

" hard-interfaces" loadmod || " soft-interfaces.lse" load

In LSE64: loadmod sets the flag, || conditionally exits.
> then you can also
> throw an exception.

Not usually a good idea. Throwing an exception is a leap into the
darkness, goto without a target. Only to be used in exceptional
situations, not for routine failure recovery as far as I'm concerned.
Show full article (0.85Kb)
no comments