2006/9/12, Ewart Shaw <[EMAIL PROTECTED]>:
[snip]
Ob.Programming content:
I mentioned my use of (e.g.)
setpc=: 3 : 'PENCOL=: y'
getpc=: 3 : 'PENCOL'
...
getpc''
As Bill Lam said, if setpc/getpc have no side-effects,
then using PENCOL directly is no different from using setpc/getpc.
My main reason for setpc/getpc is that I may later want to change
the structure of PENCOL, e.g. to
setpc=: 3 : 'try. PENCOL=: PENCOL,y catch. PENCOL=: ,y end.'
getpc=: 3 : '{: PENCOL'
pcback=: 3 : 'PENCOL=: }: PENCOL'
However, your mileage may vary.
For those who are interested in this approach, have a look at the
monumental paper by D. Parnas at http://www.acm.org/classics/may96/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm