Is all this Invarient **** er... stuff, premature optimisation?
Bill Baxter
dnewsgroup at billbaxter.com
Tue Apr 29 22:12:41 PDT 2008
Sean Kelly wrote:
> Right. The greatest obstacle here is the const design, since the meaning
> of "const" is actually different between D 1.0 and 2.0, as well as the
> requirement that even code in version blocks must be syntactically
> correct. Thus to support a toString method that returns a const string,
> for example, the return value must be declared as an alias using a string
> mixin. Messy stuff, but it does work.
>
I personally think that for a big library like Tango, using a
preprocessor would be a less painful way to go. The shipped versions of
the lib would have the preprocessor already pre-run, so would be pure D
code.
--bb
More information about the Digitalmars-d
mailing list