Compiler scalability. Question inspired by OOM errors seen by Crystal language

Pradeep Gowda via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 29 18:30:30 PDT 2017


I'm referring to this thread about Crystal --  
https://lobste.rs/s/dyitr0/its_fun_program_crystal_is_it_scalable

> Crystal is strongly typed, but overwhelmingly uses type 
> inference, rather than explicit types. Because Crystal aims to 
> be spiritually—and frequently literally—compatible with Ruby, 
> that’s a problem: to accomplish that, Crystal relies on 
> sometimes-nullable types with implicit structure and implicit 
> unions, such that, frequently, the only way to even begin type 
> inference is to load the entire program’s AST into RAM all at 
> once and then start your massive type inference pass. What 
> you’re seeing in this thread is how a “simple” fix to a YAML 
> parser error reporting hit that problem, causing Crystal to use 
> a critical amount too much RAM and OOM.

How does D compare in this regard, especially in cases where 
`auto` storage class specifiers are used liberally throughout the 
code base?


More information about the Digitalmars-d mailing list