Hacker News new | ask | show | jobs
by dotancohen 77 days ago
Ban constructors? Though I don't agree with the practice, I could imagine a reason for banning destructors. But constructors? Why?
1 comments

Because the two go together. If you have to ban one, you pretty much have to ban both.

Although, I guess if you only statically allocated everything once at startup, you could use constructors without destructors? Presumably using the placement versions would also let you use constructors without destructors.

I'm generally talking about systems that are <64KB. You basically don't get heap and determinism is really important.

I see, thank you. I have never done embedded.