[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Aug 23 21:17:38 2003 
Subject:Re: word completion (Was poplog interactive mode - PS -> Syntax editor) 
From:Jonathan L Cunningham 
Volume-ID:1030823.01 

On Fri, 22 Aug 2003 12:28:29 +0100, Chris Dollin <kers@hpl.hp.com>
wrote:

>Jonathan L Cunningham wrote:
 
>> I'd quite like a SPOO-Z too, but it might be harder to implement.
>> 
>>     SPOO-Z     write the current procedure for me :-)
>
>Oh, that's easy.
>
>    define theCurrentProcedure(); 
>        mishap( 'oops, not implemented yet' );
>    enddefine;
>
>Satisfies the spec :-)

And sometimes surprisingly useful during incremental
development/debugging of a program with complicated control flow.

Along the same lines, especially if you know the argument list, is
something like

    define cook(meat, veg1, veg2) -> dinner;
       [cook called, args are ^meat ^veg1 ^veg2]=>
       readline() --> [?dinner];
    enddefine;

so that the developer can emulate the missing function. Was (very)
occasionally useful developing expert-systemy type code, where what
the function had to do was AI (and hard) but it was fairly obvious
to the expert what the answer should be (especially since you could
invoke popready() if you wanted to call other functions before
returning the answer).

But not nearly as useful as it might look. Strange.

But you get something similar in debugging, say, C++ code, where you
can inspect and alter variables at breakpoints. I hardly *ever* alter
the value of a variable and let the program continue. If a variable
doesn't have the value you expect, there's a bug to be fixed ...

Similarly, if I ran into the "oops, not implemented" I'd probably stop
and implement (all of) it. I don't know if other people have different
coding strategies.

Jonathan

-- 
(To e-mail me, replace spam by jlc in the e-ddress)