On 19/11/13 05:17, Patrick Walton wrote:

> I've observed a lot of beginning Rust programmers treat the language as
> "add sigils until it works". (I have specific examples but don't want to
> name people here; however, feel free to contact me privately if you're
> curious.) They end up with slow programs and frustrated with Rust,
> wondering why they had to fight the compiler if they seemingly didn't
> gain any performance from it.
> 
> I think a fair amount of it is that the sigils don't visually convey
> enough information to the programmer; they feel like something that you
> just have to add to make the compiler happy. A sigil in Rust's
> expression grammar as it stands represents an *action*, not a
> *qualifier* as it does in most other languages (e.g. `$foo` in PHP).
> Moreover, the `~` expression maps to one of the most expensive machine
> operations in the entire language semantics! It's thus important in my
> view to emphasize to newcomers that `~` *means* something; it is not
> just a qualifier you have to add to make the compiler happy. Indeed, if
> you are adding it just to make the compiler accept your code, there's
> something wrong--either the API you're using is inefficient or you're
> confused about the semantics!

I agree 10000% with what was said above.

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

Reply via email to