← Back to context

Comment by thomashabets2

1 day ago

> All the examples you've shown in your article were "huh? isn't this obvious?" to me.

It is. None of this was new to me. In C++ defining a non-virtual destructor on a class hierarchy is also not new to me, but a fair critique can be made there too why it's "allowed". I do feel like C++ can defend that one from first principles though, in a way that Go cannot.

I'm not sure what you mean by the foo99 thing. I'm guessing this is about defer inside a loop?

> Is fixing those perceived footguns really a missed opportunity?

In my opinion very yes.