Whither Tango?

yigal chripun foo at bar.com
Sat Feb 20 09:51:31 PST 2010


Andrei Alexandrescu Wrote:

> yigal chripun wrote:
> > Nick Sabalausky Wrote:
> > 
> >> "Justin Johansson" <no at spam.com> wrote in message 
> >> news:hlop1u$o1m$1 at digitalmars.com...
> >>> Nick Sabalausky wrote:
> >>>> Right, that's what I meant. Use a word starting with "retro-"
> >>>> when talking to a english-speaking person, and even if they're
> >>>> uneducated, they'll most likely have a good idea what is meant
> >>>> by that prefix.
> >>> What about persons with English not as a first language?
> >>> 
> >> I do realize that different native languages can be an issue, but
> >> at some point a library has to use *some* language, and the
> >> established standard for phobos just happens to be english. If we
> >> start banning terms from use in a language or a library on the
> >> basis of whether a non-native english speaker is likely to know it,
> >> then I suspect (though I admit that I don't know for certain) you'd
> >> have to eliminate most of the given language/library because 
> >> there's no guarantee non-native speakers would know any of it.
> >> 
> >> For instance, if there were a russian-langauge library, and I tried
> >> to use it, I wouldn't understand any of the words except nyet and
> >> da (and I'm not even sure of the correct spellings of those - in
> >> either roman or cyrillic). And I would be well aware that I
> >> wouldn't be able to assume I knew what something did without a
> >> little digging. Of course, I certainly sympathize that this can be
> >> a pain for non-native-english-speaking programmers, and that it's
> >> an issue native english speaking programmers like me will probably
> >>  never be able to truly understand, but until we get to some
> >> hypothetcal point in the future where everyone speaks the same
> >> language, then, again, at some point there really is no choice but
> >> to just assume at least some particular language.
> >> 
> >> Besides, computer terminology is already, at best, just a bunch of
> >> vague meaphors anyway. When I started programing, it took me all of
> >> about a minute to learn that "string" had nothing to do with the
> >> stuff cloth is made of and stitched together with. And "SCSI"
> >> doesn't mean a damn thing at all, even to an english speaker, but I
> >> still learned it quickly enough. So even if I wasn't familiar with
> >> "retro" as anything other than "old style", I'm sure I still could
> >> have gotten used to it very quickly, especially considering that in
> >> 99.99% of contexts it's going to be pretty damn clear that it's not
> >> being used to refer to bell-bottoms, chome appliances, and
> >> flock-of-seagulls haircuts.
> >> 
> >> 
> > 
> > This is being silly (and needlessly long). There's no need to collect
> > statistics on the level of English of non-native D programmers
> > worldwide to decide what name to use for a function.
> > 
> > It's very simple actually: you want to name a function that reverses
> > your range and you have several valid names for it, please choose the
> > most common word (the first that comes to mind) which in this case is
> > (surprise!) - "reverse". (or any variation that makes sense in this
> > particular case, like "reversed")
> > 
> > simple logic, don't you agree? Any human language has more than one
> > way to express oneself. The best way to reach a wide (and
> > international) audience is to use the most common phrases - don't go
> > all academic on me with Latin or Shakespearean words and don't go
> > getho on me with misspelled slang. Is that so much to ask for?
> 
> There's no reason to get agitated as nobody is trying to push 
> incomprehensible crap on anyone. The problem I was confronted with was:
> 
> (a) "reverse" was already taken;
> 
> (b) I found "reversed" too subtly different from "reverse". Besides, it 
> wasn't clear to me that it was descriptive enough - e.g. some people 
> might believe that "reversed" returns a reversed copy of the range;
> 
> (c) I was looking for a short name because I presume the function will 
> be used often;
> 
> (d) In my experience names that are slightly odd but evocative tend to 
> stick to memory.
> 
> So I chose "retro". What exactly seems to be the problem? If half of 
> Phobos' names were weird, I'd say fine, but this discussion latched on 
> poor "retro" and "iota" as if posters' lives depended on it. Again: how 
> exactly are these two names preventing you from getting work done?
> 
> 
> Andrei

you just refuse to get it. It's not the specific retro function that is so frustrating to me. 
any public API (and especially so for the standard library) *must* have a consistent naming scheme. It *must* prefer clarity over shortness and it *must* be designed such that it will lead to easier understanding of code using it _without_ referring to the manual every function call. 
phobos fails on all the above. 

It's easy to read Java/Python/Ruby/D-with-tango code and understand most of it from first read. This is VERY important since 95% of time is spent on maintenance of code that was most likely written by someone else. 

easy maintenance require clarity, not creativity. 



More information about the Digitalmars-d mailing list