On Mar 22, 4:43 am, Doug Hoffman <no.spam> wrote:
> William James wrote:
> > On Mar 17, 3:54 pm, Doug Hoffman <no.spam> wrote:
>
> >> VARIABLE TOP ( y coordinates top of box)
> >> VARIABLE LEFT ( x " left side)
> >> VARIABLE BOTTOM ( y " bottom)
> >> VARIABLE RIGHT ( x " rightside)
> >> : [BOX] ( x1 y1 x2 y2)
> >> BOTTOM ! RIGHT ! TOP ! LEFT !
> >> LEFT @[EMAIL PROTECTED]
TOP @[EMAIL PROTECTED]
RIGHT @[EMAIL PROTECTED]
TOP @[EMAIL PROTECTED]
LINE
> >> RIGHT @[EMAIL PROTECTED]
TOP @[EMAIL PROTECTED]
RIGHT @[EMAIL PROTECTED]
BOTTOM @[EMAIL PROTECTED]
LINE
> >> RIGHT @[EMAIL PROTECTED]
BOTTOM @[EMAIL PROTECTED]
LEFT @[EMAIL PROTECTED]
BOTTOM @[EMAIL PROTECTED]
LINE
> >> LEFT @[EMAIL PROTECTED]
BOTTOM @[EMAIL PROTECTED]
LEFT @[EMAIL PROTECTED]
TOP @[EMAIL PROTECTED]
LINE ;
>
> >> **END EXCERPT FROM TF
>
> > : from_corner { x y xx yy -- }
> > x y xx y line
> > x y x yy line ;
>
> > : box { x y xx yy -- }
> > x y xx yy from_corner
> > xx yy x y from_corner ;
>
> Yes. Lots of ways to solve the problem. (is that *factoring* with
> locals?) ;-)
>
> -Doug
We hear that locals discourage factoring. The proof?
Newbies use locals and don't factor.
Post hoc, ergo propter hoc.
It seems more likely that newbieness causes both
the lack of factoring and the use of locals.
Unfactored code tends to be harder to read,
comprehend, and maintain.
The same can be said of code that uses stack
manipulation instead of locals.
But embedded-controller programmers have a
mistrust for anything higher-level than
assembly language. So they keep churning
out stack spaghetti.