Bool type - can't it be zero / nonzero?

Walter Bright newshound1 at digitalmars.com
Mon Jun 9 03:33:54 PDT 2008


Jarrett Billingsley wrote:
> This "tool issues drive the spec" kind of worries me.  This is not the only 
> instance.  D limits the size of single blocks of data in the static data 
> segment to 16MB with the rationale that "anything bigger should really be on 
> the heap."  The truth seems to be that OPTLINK simply crashes or does 
> something equally horrible if there is a piece of data more than 16MB in the 
> static data segment.  Coincidence?

No. Both are true. Optlink has an internal limit of 16Mb for one 
variable of static data, and it's hard to fathom a need for anything 
larger that isn't better served by the heap.


> I'm worried what's next.  "D does not permit variadic templates whose 
> mangled names would be longer than 4096 characters"?

D has almost no numerical limits compared to other languages like C and 
C++, which have quite a few.


> Now some things are understandable.  Working on my own implementation of a 
> language it's become clear that some features are simply unworkable because 
> of inherent limitations of the environment in which the implementation is 
> written.  But this should not have any bearing on the spec, only a note in 
> the implementation notes saying that it _almost_ follows the spec but 
> doesn't in this area because of some restriction.

It's difficult to say if a program is language conformant if it fails on 
one compiler due to exceeding a limit and works with another, and if the 
language does not specify any limits. It's also difficult to say if a 
compiler is conformant.

16Mb is an extremely high limit for a single piece of statically 
initialized data.



More information about the Digitalmars-d mailing list