DCT use cases - draft

Roman D. Boiko rb at d-coding.com
Tue May 22 09:47:23 PDT 2012


On Tuesday, 22 May 2012 at 16:03:49 UTC, Dmitry Olshansky wrote:
> In my mind it's encountered rather soon:
>
> lex/scan -> postprocess (may be combined with lex) -> populate 
> symbol tables (ditto  - with next step/previous step) -> parse 
> to AST -> ...
> That symbol table should contain all of the rich hierarchy of 
> modules. That is the actual compiler is able to have a single 
> stack of scopes that it pushes/pops as it processes code. Your 
> DCT on the other hand should have all of local scopes (of every 
> entity) at once.
>
> It may be possible to simulate it with some deal of laziness, 
> but I guess keeping the whole symbol table is the easiest and 
> the fastest way still.
And likely the only feasible in D. It doesn't support lazy 
evaluation for immutable data structures, and immutability is 
necessary for most use cases.

> Watch out for some mind-bending data structures :)
Do you mean not to overcomplicate? Or use classic data 
structures? Or something else?

So far I think immutable red-black trees will be central in DCT 
architecture, as well as some others.


More information about the Digitalmars-d mailing list