Proposed improvements to the separate compilation model

Jacob Carlborg doob at me.com
Tue Mar 5 04:19:16 PST 2013


On 2013-03-05 13:01, eles wrote:

> Exactly for this reason, what about make this way at least the
> recommended way, if not the single one?

You want to break every single piece of D code that uses classes?

> What is to lose? As about what to win, basically each .d file will carry
> its .di file (class definition) inside it, and the latter can be easily
> extracted (both visually and automatically).
>
> Just one note: please allow that the private variables of a class (those
> that are not exposed outside the file) be declarable outside the main
> definition of the class, that is with the . syntax. This will completely
> make declaration and implementation independent, to the point that the
> class definition is an interface and nothing else.

The compiler will need to know the size of the class, for that it needs 
to know the instance variables.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list