CORRECT!

When the Dead do walk seek water's run, for this the Dead will always shun.swift river's best or broadest lake, to ward the Dead and haven make.if water fails thee, fire's thy friend, if neither guards it will be thy end.

Go is building a garbage collector (GC) not only for 2015 but for 2025 and beyond …

Hmm. This statement seems oddly familiar.

a garbage collector for the next ten years.....?

DAMMIT FBMACJEFF! YOU RUINED ANOTHER LANGUAGE FOR EVERYONE ELSE!

When the Dead do walk seek water's run, for this the Dead will always shun.swift river's best or broadest lake, to ward the Dead and haven make.if water fails thee, fire's thy friend, if neither guards it will be thy end.

I'd buy that for a dollar!

When the Dead do walk seek water's run, for this the Dead will always shun.swift river's best or broadest lake, to ward the Dead and haven make.if water fails thee, fire's thy friend, if neither guards it will be thy end.

I'd buy that for a dollar!

I was going for Robocop, but sure, Smash TV works.

one was riffing on the other, so sure.

also, nice ID. you've done this before!

When the Dead do walk seek water's run, for this the Dead will always shun.swift river's best or broadest lake, to ward the Dead and haven make.if water fails thee, fire's thy friend, if neither guards it will be thy end.

Oh, was it phrased that way originally? Can't remember. Seemed close enough, though.

probably not, i was drawing a closer analog to make the joke work.

When the Dead do walk seek water's run, for this the Dead will always shun.swift river's best or broadest lake, to ward the Dead and haven make.if water fails thee, fire's thy friend, if neither guards it will be thy end.

Hm? Name clashes with multiple inheritance are just as easy to handle as name clashes with multiple interfaces.

The only thing that makes multiple inheritance annoying to use is the diamond inheritance problem. In languages where every class inherits from a base class "Object", you would always have to deal with that.

I prefer single inheritance and explicit interfaces to multiple inheritance

Also note that in C++, many interfaces are implemented as concepts, not as abstract base classes. So it actually uses a mixture of duck typing and multiple inheritance where other languages would use interfaces.

Also note that in C++, many interfaces are implemented as concepts, not as abstract base classes.

That's because static polymorphism and dynamic polymorphism are two separate concepts in C++ that don't play together at all.

One thing I love about Rust is that traits work both for static and dynamic polymorphism, which means library developers don't have to spend any time thinking which approach will be better for most future users of their library.

One thing I love about Rust is that traits work both for static and dynamic polymorphism, which means library developers don't have to spend any time thinking which approach will be better for most future users of their library.

Rust has awesome concepts, but I won't use it for new projects until they finally make their borrow checker a bit smarter (flow-sensitive), so you don't have to put unnecessary blocks everywhere.

Also, I'm missing something similar to macros that can modify the attributed AST. In their current state, where you have no type information at all, macros are not even close to a replacement for templates.

What does that mean? Not sure I've heard of concepts in that context before

For example, Iterator is a concept in C++, not an interface. Which means that certain operators, functions and typedefs are expected to be implemented in an iterator, so that you can use it like any other iterator in a template (or in regular code).

Go is building a garbage collector (GC) not only for 2015 but for 2025 and beyond …

Hmm. This statement seems oddly familiar.

: "How do you suppose it was that we gained sub-millisecond garbage collection?" : "It cannot be..." : "Search your weblogs. You know it to be true..." : "Luke, we used a CDN." : "GOOOOOOOOOOOOOOOOOOOOOOOOOO"

"Our garbage collector is revolutionary because we optimized it for minimal pause times." - Yeah, right…

This seems relevant to the "it's not a science" thread:

It has been known since 1984 that most allocations “die young” i.e. become garbage very soon after being allocated. This observation is called the generational hypothesis and is one of the strongest empirical observations in the entire PL engineering space. It has been consistently true across very different kinds of programming languages and across decades of change in the software industry: it is true for functional languages, imperative languages, languages that don’t have value types and languages that do.

And the article as a whole seems related to the "Linus on Innovation" thread, comparing innovative garbage collection techniques with Go's iteratively improving the old stuff approach.

So does anyone know the state of the art on computed disposal? That is, the compiler figuring out (whenever possible) where things can get freed and directly freeing it at the right places and times instead of waiting for it to be collected?

"Our garbage collector is revolutionary because we optimized it for minimal pause times." - Yeah, right…

This seems relevant to the "it's not a science" thread:

It has been known since 1984 that most allocations “die young” i.e. become garbage very soon after being allocated. This observation is called the generational hypothesis and is one of the strongest empirical observations in the entire PL engineering space. It has been consistently true across very different kinds of programming languages and across decades of change in the software industry: it is true for functional languages, imperative languages, languages that don’t have value types and languages that do.

And the article as a whole seems related to the "Linus on Innovation" thread, comparing innovative garbage collection techniques with Go's iteratively improving the old stuff approach.

So does anyone know the state of the art on computed disposal? That is, the compiler figuring out (whenever possible) where things can get freed and directly freeing it at the right places and times instead of waiting for it to be collected?

Go's compiler puts things on the stack unless it absolutely needs to put them on the heap. For example, you can allocate a bunch of pointers to structures and pass them around, but if they never escape the scope of the function they were allocated in, it'll just put them on the stack in the first place.

Go's garbage collector doesn't have to deal with the objects that "die young" because they were never on the heap in the first place.

I'm not 100% up to speed, but compilers can do a hell of a lot where they know enough. “Know enough” requires determining where a memory object comes into being, where it ceases to be talked about through known references, whether the functions you call modify anything, and knowing that nobody's playing shenanigans with address arithmetic. Once you've got all that (actually pretty common where you've got the right annotations on your library functions) then it can work out where you've got genuine short-lived memory, and that's a candidate for migration to the stack (and other generalised trickery).

Compilers can also insert a lot of information about where variables are and when they're holding meaningful data. OTOH, when things absolutely must live on the heap and absolutely need to be passed around all over, everything gets more complicated. I've yet to figure out how to tell a compiler to assume that it is working with strictly a single thread and that memory objects don't cross thread boundaries (except in special areas) as that would allow the heap to be tamed more thoroughly, but that might be my lack of study…