Better HN
topnewbestaskshowjobs
Log inSign up

workincog

10 karma · joined May 17, 2017 (9y ago) · 1 submissions

Submissions

comment 9y ago · link · parent

And of course his "simple" example of an `Either` class leaks and doesn't call destructors, because C++ unions do not cleanly support types with nontrivial destructors.

Meanwhile the open source project he links to has an implementation that is hundreds of lines of template magic that I gave up on interpreting.

I've dealt with codebases like this and I strongly recommend against using this kind of arcane template incantations in production. It becomes an impenetrable fog for newbies, and a morass for veterans with something to prove.