DIP66 - Multiple alias this

mw mingwu at gmail.com
Mon Sep 28 21:30:39 UTC 2020


On Monday, 28 September 2020 at 21:11:04 UTC, H. S. Teoh wrote:
>
> Good. Now make it work for D. :-P
>
> Note that this is easy to do in Eiffel because it has a dynamic 
> memory layout; D does not.  Making it work for D will be

Not sure what you mean by dynamic memory layout.

Eiffel is a statically compiled language. All the class's memory 
layout is know at compile time (as it's fully specified by the 
programmer in the source code).

BTW, many (if not all) Eiffel compilers actually compile Eiffel 
program to C (as target language).

I just uploaded SmartEiffel (open source) 1.1 compiler, and my 
previous visitor example to:

https://github.com/mingwugmail/dlang_tour/tree/master/eiffel

You can play with it.

And the generated C code of my example is:

https://github.com/mingwugmail/dlang_tour/blob/master/eiffel/visitor/app1.c

You can study it.

> extremely complex, and probably will not justify the 
> comparatively meager benefits relative to the cost.

Well, we are solving the sub-typing `alias this` & various mixin 
problems here in Dlang in the very thread.



More information about the Digitalmars-d mailing list