| Re: a relational database done in forth would r0ck |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.forth · Group Profile
Author: spamspam Date: Sep 7, 2008 09:26
On Sat, 6 Sep 2008, William James wrote:
> On Aug 26, 6:31 pm, John Passaniti JapanIsShinto.com> wrote:
>
>> Interactive testing! Hoo-boy! Nobody else has this! No technique is
>> more Forth-like than interactive execution and testing!
>>
>> : square dup * ;
>> 3 square .
>> 9
>>
>> Ahem.
>>
>> function square(x) return x*x end
>> =square(3)
>> 9
>>
>> Okay, so at least one other language lets you build up code
>> incrementally and test it.
>>
>> Ummm, but Forth lets you use the text interpreter to simplify
>> applications! Check this definition out from Bernd's web server in Forth:
>>
>> : GET get-url data on active off ;
>>
>> S" GET /some/example" EVALUATE
>
> Ruby:
>
> C:\>irb --prompt xmp
> def square x
> x*x
> end
> ==>nil
> eval 'square 9'
> ==>81
Tcl:
%% proc square x {return [expr $x * $x]}
%% square 9
81
I suppose that what some people believe is unique to forth is simply a
common attribute of interpreted languages, no?
|