View mode: basic / threaded / horizontal-split · Log in · Help
November 29, 2010
Re: D's greatest mistakes
Steven Schveighoffer Wrote:

> lack of tail-const/immutable for classes.
> 
> And no, Rebindable doesn't cut it.

As I understand, it's primarily issue for collections?
November 29, 2010
Re: D's greatest mistakes
On Monday, November 29, 2010 12:48:45 Kagamin wrote:
> Steven Schveighoffer Wrote:
> > lack of tail-const/immutable for classes.
> > 
> > And no, Rebindable doesn't cut it.
> 
> As I understand, it's primarily issue for collections?

The lack of tail-const is a particularly big problem for handling ranges, I 
believe. It means that certain things will work with arrays which won't work 
with user-defined ranges.

- Jonathan M Davis
November 29, 2010
Re: D's greatest mistakes
On Mon, 29 Nov 2010 15:53:51 -0500, Jonathan M Davis <jmdavisProg@gmx.com>  
wrote:

> On Monday, November 29, 2010 12:48:45 Kagamin wrote:
>> Steven Schveighoffer Wrote:
>> > lack of tail-const/immutable for classes.
>> >
>> > And no, Rebindable doesn't cut it.
>>
>> As I understand, it's primarily issue for collections?
>
> The lack of tail-const is a particularly big problem for handling  
> ranges, I
> believe. It means that certain things will work with arrays which won't  
> work
> with user-defined ranges.

Yes, this applies to non-classes as well, thanks for pointing that out.

But no tail-const for classes is a glaring mistake to anyone learning the  
language.  Tail-const for ranges is a bit more obscure.

-Steve
Top | Discussion index | About this forum | D home