[REBOL] Re: Help function for contracts
From: greggirwin:mindspring at: 17-Oct-2002 13:53
Hi Jan,
Thanks! I'll have to make some time to check in out in depth. I'm a big fan
of DbC, and have played around with some ideas myself.
In CONTRACT, you're doing this:
x: copy [require pre]
x/2: pre
y: copy [ensure post result]
y/2: post
Is there a reason you're using two separate steps, rather than something
like this:
x: copy reduce ['require pre]
y: copy reduce ['ensure post 'result]
Also, what do you think about ordering the parameters to CONTRACT in the
order that they are applied (as it were): spec pre local body post ? I've
also toyed with using refinements for specifying pre and post conditions,
plus some other wacky function specification dialect ideas.
<< Also, my script lost its "neat" appearance after upload.
I edited the stuff in MS notepad, since I cannot afford
using anything sophisticated, such as Jedit editor,
due to too little memory on my machine. >>
Have you tried ConTEXT or NoteTab-light?
--Gregg