I should add that the ideas in the proposal are not (all) my own. I'm
collecting ideas that have been floating around in various discussions
and trying to get them together in one place and make sure that all the
repercussions work out.
Niko
On 12/5/11 2:09 PM, Niko Matsakis wrote:
Hello,
I've been working on writing up a proposal that modifies Rust to
eliminate (most) implicit copies.
http://smallcultfollowing.com/babysteps/rust/no-implicit-copies/
The idea is to separate types into implicitly copyable types and
explicitly copyable types. Implicitly copyable types would be
scalars, shared pointers (@), and tuples of implicitly copyable
types. Explicitly copyable types would be everything else. Copies of
explicitly copyable types only occur when there is an explicit `copy`
keyword in the source text.
Also in the proposal is that vectors and strings are no longer
unique. Instead, they can be either shared or unique. Vectors become
the more fundamental fixed-length arrays, with dynamically growable
vectors becoming a library. This allows support for references into
arrays, dynamically sized records, and other nice, C-like features.
Feedback would be very welcome.
Note: for those who saw the earlier, "reference type" draft, the
functions with `new` return type in this proposal are a different
beast from those in the previous "reference type" proposal. If you
have no idea what I'm talking about, don't worry, it's not important.
Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev