Thanks, Graydon, for the detailed reply.
> As a meta-comment, the reflexive use of abbreviations in
> not-frequently-typed names seems like a problem.
I don't find it a problem. A bunch of people have expressed distaste,
but a bunch of others have expressed pleasure. As a recently-tweeted
quip put it, "One person's idiom is another's boilerplate."
Fair enough.  But familiarity creates bias.  How much does the reaction
of newcomers to the language matter?  Too-cryptic names add to
cognitive load at a time when there is little capacity to spare. Your
reservations about "ext" are well placed.
modern editors with auto-complete make these unnecessary?
We've generally avoided (and I am opposed to) design choices that
require a "modern editor". At least anything more modern than vi or
emacs. I know some people even write code in acme, or microemacs.
This is a wholly admirable policy, but "require" seems like a pretty
strong word, here.
There was some work on this sort of guideline-making in the style guide
recently, but I recall you objecting to those guidelines (indeed, the
mere idea of them). And you also suggested we sacrifice everything for
"conscious attention, screen space, editing time, short-term memory",
which suggests (to me) a strong preference for short names. So I can't
really tell what if anything you feel like we should be doing differently.
My opinion may be worth only as much as it weighs, but I do
not object to guidelines in general; I just hope to see proposals
traceable, in detail, to defensible principles and measurable
consequences.  Without, there's a real temptation to enshrine
personal preferences that owe more to history than to sense.
As a new language, Rust offers a rare opportunity to leave old
mistakes behind.  (I would count StudlyCapsNames among such
mistakes, but that bridge seems burnt.)

Short names are good, but Kernighan's "telephone test"  identifies
a sane natural limit.  Too, language constructs that are considered poor
form benefit from unwieldy names (e.g. C++ "reinterpret_cast").

- Nathan Myers

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

Reply via email to