On 11/30/13 1:01 AM, Kevin Ballard wrote:
Is consistency with C++ really so important as to break what is now a
pretty strong library convention?

We've broken conventions so much in the past. I don't think backwards compatibility is a concern yet.

Especially since the replacement
convention, as seen in PR #10697, is pretty bad (namely, using ::init()
instead of ::new(); init() to me seems as though it should merely
initialize a value, not construct a new value. Heck, the old Path
convention of using Path(..) is better than Path::init(..)). As I've
been arguing, `new` is not inherently self-documenting, and the
confusion around ~ can be solved with proper documentation (just as a
C++ programmer needs to be taught that `new` is the allocation operator,
a Rust programmer would be taught that ~ is the allocation operator).

That was the justification for sigils, but it hasn't worked so far. I've seen many people trying Rust get stuck on the sigils and move to other languages.

As
for placement new, while it needs to be supported in some fashion, it's
going to be used pretty rarely, such that I don't think it's worth
reserving a keyword just for that.

Placement new is not going to be used rarely. In Servo, for example, it's used all over the place.

We've been moving stuff from the language into the libraries, yes. But
losing ~ seems like losing a big part of the "flavor" of Rust, so to
speak.

That "flavor" is much of the reason for Rust's reputation as an overly complex language.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to