Hacker News new | ask | show | jobs
by ruduhudi 2751 days ago
This is a long discussion and I hope this has not come up yet:

You can avoid the double constructor problem by using a rust-style constructor pattern:

class Foo { static int from(Foo *that) { that = new Foo(); that.x = 3; return Status::SUCCESS; } int x; }