Based on a quick read, this sounds almost identical to what I proposed, except that `construct()` would be the "literal" syntax.

Looks like a neat blog, thanks for the tip.


Niko

On 4/12/12 12:03 PM, Joe Groff wrote:
On Thu, Apr 12, 2012 at 11:54 AM, Niko Matsakis<n...@alum.mit.edu>  wrote:
You would then create an instance of C using `C::create(...)`. The only
thing I am not sure about is how one declares the construction to be
private?
Have you guys read Bob Nystrom's notes about designing a safe
constructor interface? His design is by his own words unusual but
could be a good fit for Rust.

http://journal.stuffwithstuff.com/2010/12/14/the-trouble-with-constructors/

-Joe

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to