News for hackers. Stuff that matters.
Re:How generics are implemented in Go 1.18 by klodolph on Tuesday March 01, 2022 @03:51PM (#30519825)
I've done that in lots of languages, but it usually means I was trying to crash the compiler :-)

I remember there was some simple way to crash a Haskell compiler with an out of memory error by defining a series of types, where each successive type required twice as much memory as the previous type to represent.

Re:How generics are implemented in Go 1.18 by gspr on Wednesday March 02, 2022 @06:30AM (#30526143)
> I've done that in lots of languages, but it usually means I was trying to crash the compiler :-)

It's a real problem.

Anecdotally: I maintain a Debian package with a large-ish (but far from huge), template-heavy C++ codebase. I had to give up on compiling on 32 bit machines long ago, simply because not enough addressable memory was available to the compiler. I know other maintainers have to heavily tune the compiler to work around the problem, too.

I was once asked by the Ubuntu folks to disable parallel builds altogether, due to even their 64 bit builders running out of memory altogether.

And this package is just large-ish – it's nowhere near truly large (like a browser or an office suite).