Scientific computing with D

Christopher Wright dhasenan at gmail.com
Sat Jan 31 20:09:39 PST 2009


Walter Bright wrote:
> 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.

If bash took 0.5 seconds to execute anything, I wouldn't use it.

If it were something that I used infrequently, I'd tolerate that.



More information about the Digitalmars-d mailing list