logical const idea - scratchspace

Steven Schveighoffer schveiguy at yahoo.com
Mon May 14 13:13:56 PDT 2012


On Mon, 14 May 2012 15:56:37 -0400, Alex Rønne Petersen
<xtzgzorex at gmail.com> wrote:

> On 14-05-2012 21:51, Steven Schveighoffer wrote:

>> It also should be recommended that the scratch space not contain any GC
>> pointers, since it's *not* participating in the type system properly,
>> the GC may not treat it as a pointer.
>
> That renders it useless for caching e.g. a string though...

Yes, it does.  Unless you know the size of the string (so you can allocate
enough scratch space to hold it).

It's not perfect, for sure.  But it might be better than nothing...

-Steve


More information about the Digitalmars-d mailing list