On Jul 17, 2012, at 10:41 AM, Graydon Hoare wrote:
> Ok, the keyword stuff I'm not really interested in debating ad infinitum, 
> there just aren't _enough_ of them for this to be worth a long discussion 
> (and it's 5 chars vs. 6, seriously). The abbreviations in library code are a 
> different matter. It's true that we have a bunch of abbreviated library 
> names. Examples:
> 
>  vec (not Vector)
>  cmp (not Compare)
>  bitv (not BitVector)
>  dbg (not Debug)
>  dlist (not DoublyLinkedList or CircularList)
>  iter (not Iterable)
>  ptr (not Pointer)
>  rand::rng (not Random::Generator, say)
>  sys (not System)
>  rt (not Runtime)
> 
> Are these sorts of abbreviated names actually posing a problem to users? 

As an outsider/newbie to Rust, I think this is pretty much a non-issue. Names 
are always going to be hard without good documentation, and with it, they will 
always be easy to use. It is no easier to remember vector than vec, and I think 
learning the name is the smallest/easiest thing you need to do when you are 
learning a library. As long as they aren't confusing (like if the name for a 
vector were "dup" or something similarly irrelevant/arbitrary), I personally 
think it is great that they are short. Not to make it easier to _write_, but to 
make it easier to read code. I want to have to read the minimum number of 
characters, and ideally be able to have the most amount of content on a single 
screen, within reason (it has to be relevant). 

At least for me, it is similar with the core syntax. There aren't that many 
keywords, so learning them isn't going to be that hard no matter what they are, 
and short / relevant seems great to me. This isn't a language that is targeting 
people who've never programmed before, and for people who have, learning syntax 
is easy, so providing a syntax that makes it more pleasant to program in once 
you actually know the language (i.e., easier to read, based on shorter keywords 
etc) is a good thing. Too often I think there is a tendency to want to cater a 
language somewhat to people who've never used it before, even though the 
reality is that most people who are using it will know it well, and people who 
don't will be able to learn it based on good documentation, _not_ language 
features.

As an aside / broader comment, I think that rust code looks great (with a few 
caveats, which are actively being worked on), and congratulate the team on 
managing to balance interesting semantics (which is the exciting part, of 
course), with syntax that actually makes me want to program in it (as much as 
people say syntax doesn't matter…. it does). I would be very happy if this 
allowed me be able to stop writing C++. So, keep up the good work.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to