Scientific computing with D

Daniel Keep daniel.keep.lists at gmail.com
Sat Jan 31 03:39:33 PST 2009



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.

  -- Daniel



More information about the Digitalmars-d mailing list