4 ms·
> On the other hand I've read reports that sufficiently large codebases begin to hit machine memory limits for the compiler because they have to scan and constr
by dualogy 9y ago
> On the other hand I've read reports that sufficiently large codebases begin to hit machine memory limits for the compiler because they have to scan and construct every possible union type in the codebase
I'd be interested why a compiler would even need to do so in the first place --- constructing every possible one instead of every one it encounters as clearly needed right now.
Edit: OK I see it now, you can have stuff like Int32|String. Still though.. TS can "handle" that too?
- vanderZwan 9y agoMaybe we're confusing type inference with code generation here? TypeScript doesn't compile to machine code ahead of time, it only has to verify the types. Here is one of the creators of the language talking about the global type inference of Crystal: https://www.youtube.com/watch?v=xbdVs4FhZac&t=16m https://www.youtube.com/watch?v=xbdVs4FhZac&t=16m