REPL semantics
jmh530
john.michael.hall at gmail.com
Thu Jul 12 20:33:04 UTC 2018
On Thursday, 12 July 2018 at 19:07:15 UTC, Luís Marques wrote:
> Consider a D REPL session like this:
>
>> void bar(long x) { writeln(x); }
>
>> void foo() { bar(42); }
> 42
>
>> void bar(int) {}
>
> Assuming implementation complexity is not an issue, what do you
> feel is the more natural semantics for a REPL? Should foo now
> call bar(int), or should it still call bar(long)? (feel free to
> generalize the issue)
>
> I was curious to see what the existing REPLs did, but they seem
> to have bit rotted and no longer compile.
Most REPLs I've used are for languages with dynamic typing.
Perhaps take a look at a C REPL and see what it does?
More information about the Digitalmars-d
mailing list