Small feature request

Jason House jason.james.house at gmail.com
Sat Mar 29 12:24:55 PDT 2008


Koroskin Denis wrote:

> Look at this class.
> 
> class Buffer
> {
>      private int bufferSize = 4096;
>      private void[bufferSize.init] buffer = void;
> }
> 
> What's the capacity of buffer upon object construction?
> 
> I expect that buffer.length == 4096, since bufferSize == 4096, but get
> buffer.length == 0, since bufferSize.init == int.init.
> It works not as expected and confuses a little. Do I have any chanse this
> will be fixed anytime, or is it intended?

.init used to do what you want but was changed along the way...



More information about the Digitalmars-d mailing list