trusted purity?
monarch_dodra
monarchdodra at gmail.com
Mon Aug 19 10:34:01 PDT 2013
On Monday, 19 August 2013 at 12:55:54 UTC, bearophile wrote:
> For the function array() this is not enough, because instead of
> "= void" you have a function that returns some void-initialized
> data. To help the D type system a bit perhaps an annotations
> like @void_init is useful, to be attached to functions like
> uninitializedArray and minimallyInitializedArray.
>
> Bye,
> bearophile
After re-reading "pure" documentation, I think I can solve the
problem by marking uninitialized/minimallyInitialized as "weakly
pure". From there using it in a pure context is trivial.
This is in line with what GC.malloc does.
More information about the Digitalmars-d
mailing list