D for projects similar to Forth Interpreters?

Dmitry Ponyatov dponyatov at gmail.com
Sat Apr 6 08:43:36 UTC 2024


> In this case what would be the pros and cons if any of D 
> compared with C or asm?

If you're not chasing for speed, using objects, types stack and 
`Object*[string] W` vocabulary and symbolic string-addressed 
memory looks more fun than classical raw machine numbers and 
bytes.

I did this with Python version earlier (and tried C++ also), so 
having
`[ <int:123> <point:45 at 67> <window:hello> ]` on data stack looks 
much handy than dumb integers.

Interpreter tracks all typed operations, and parser allows you to 
use inline arithmetics and pushes executable ASTs on top of stack.

So, D has its own gc, and you don't need to bother about 
refrecounting and manual memory management across all the code as 
you must do it in C++.



More information about the Digitalmars-d mailing list