Hacker News new | past | comments | ask | show | jobs | submit login

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; }




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: