Scientific computing with D

Walter Bright newshound1 at digitalmars.com
Sat Jan 31 11:32:12 PST 2009


Daniel Keep wrote:
> 
> Walter Bright wrote:
>> Bill Baxter wrote:
>>> Having to recompile and rerun after every one of those changes just
>>> isn't quite as direct.
>> If it can be done in under half a second, isn't that direct enough? Of
>> course, I'm talking about a shell that does it for you.
> 
> $ int a = 42;
> $ writefln("a = %s", a);
> $ double a = 3.0; // rounded to 1 sf
> 
> How would you write a prompt that does that with D?  Either you store
> each successive line in a source file and choke on the third one, or you
> compile each line separately and choke on the second.
> 
> Or you could examine each line to look for things like redefining of
> symbols... but at that point you're half way to writing an interpreter
> anyway.

It's the shell's responsibility to decide what semantics to present to 
the user, I'm just saying that the process of turning a code snippet 
into an executable is fast and should not be a barrier.



More information about the Digitalmars-d mailing list