Concatenative language/Interactive developmentConcatenative languages are well-suited to interactive development and experimentation. You start by pushing a few values on the stack, invoke some words, play around some more, and when you're done, your input into the listener is essentially a valid program, which turns the initial stack into the final one. Unit testing in concatenative languages follows the same pattern. You supply a quotation, and a final stack; the quotation typically begins with a few literals which form the initial stack, although this is not always the case. For example, with Factor's [ "Hello world" ] [ "Hello " "world" append ] unit-test This revision created on Sat, 3 Jan 2009 01:46:31 by slava |
|
|
All content is © 2008-2010 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license. |
|