www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Whither Tango?

reply Paul D. Anderson <paul.d.removethis.anderson comcast.andthis.net> writes:
Putting even more carts before their horses ---

Will Tango move from D1 to D2 when D2 is "frozen"?

More accurately, I guess, when Walter declares D2 stable and starts on D3?
Feb 18 2010
next sibling parent reply retard <re tard.com.invalid> writes:
Thu, 18 Feb 2010 18:40:55 -0500, Paul D. Anderson wrote:

 Putting even more carts before their horses ---
 
 Will Tango move from D1 to D2 when D2 is "frozen"?
 
 More accurately, I guess, when Walter declares D2 stable and starts on
 D3?
It might help the badly split community if Tango developers started their own fork of D. This way both versions of the language could have a single standard library without any public fights. There's so much work gone in const-correct Phobos and D2. Some old Tango users might want to have a D1 style look'n'feel of the language but still develop the language a bit further.
Feb 18 2010
parent reply Bernard Helyer <b.helyer gmail.com> writes:
On 19/02/10 13:13, retard wrote:
 It might help the badly split community if Tango developers started their
 own fork of D.
No, it wouldn't. A fork would *completely* split the community (and be disastrous IMO), not help it.
Feb 18 2010
parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Bernard Helyer wrote:
 On 19/02/10 13:13, retard wrote:
 It might help the badly split community if Tango developers started their
 own fork of D.
No, it wouldn't. A fork would *completely* split the community (and be disastrous IMO), not help it.
I'm not sure. Given that the damage is already done, if the Tango community can break away and be programming in another language derived from D, it might finally stop people complaining nonsensically that D has two "standard" libraries. Tango would be E's standard library, and Phobos would remain D's. Stewart.
Feb 18 2010
next sibling parent "Nick Sabalausky" <a a.a> writes:
"Stewart Gordon" <smjg_1998 yahoo.com> wrote in message 
news:hlktm1$2gp2$1 digitalmars.com...
 Bernard Helyer wrote:
 On 19/02/10 13:13, retard wrote:
 It might help the badly split community if Tango developers started 
 their
 own fork of D.
No, it wouldn't. A fork would *completely* split the community (and be disastrous IMO), not help it.
I'm not sure. Given that the damage is already done, if the Tango community can break away and be programming in another language derived from D, it might finally stop people complaining nonsensically that D has two "standard" libraries. Tango would be E's standard library, and Phobos would remain D's.
With D1 it's a legitimate concern, but (if I understand druntime right) once Tango is ported, complaining about D2 having 2 std libs would be much like complaining about C++ having two or three (std c lib, STL, and boost). If that doesn't shut people up about "2 std libs", nothing will.
Feb 18 2010
prev sibling parent reply Ezneh <petitv.isat gmail.com> writes:
Stewart Gordon Wrote:

 Bernard Helyer wrote:
 On 19/02/10 13:13, retard wrote:
 It might help the badly split community if Tango developers started their
 own fork of D.
No, it wouldn't. A fork would *completely* split the community (and be disastrous IMO), not help it.
I'm not sure. Given that the damage is already done, if the Tango community can break away and be programming in another language derived from D, it might finally stop people complaining nonsensically that D has two "standard" libraries. Tango would be E's standard library, and Phobos would remain D's. Stewart.
I don't think that D have to be split in two "community" because it has two "standard libraries". And I would be an useless idea to make a new language derived from D only cause of that too. So, it is not better to find a compromise between these libraries ? Why they have to be "two" libraries rather than one which was designed by larsivi, Walter Bright and Andrei Alexandrescu ? Oh and to be complete about "E" : http://en.wikipedia.org/wiki/E_(programming_language) ;)
Feb 19 2010
parent reply dave eveloper <tango land.net> writes:
Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was designed by
larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b. Wasn't Tango an object oriented hardcore framework for large applications, and Phobos a procedural simple stdio wrapper for smaller scripts. I think it wouldn't be so bad if there was a "Mini-d" dialect of D that has focus on massive libraries and enterprise support.
Feb 19 2010
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
dave eveloper wrote:
 Ezneh Wrote:
 
 So, it is not better to find a compromise between these libraries ?
  Why they have to be "two" libraries rather than one which was
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
If you could provide a list of silly named symbols that could be a dealbreaker for a prospective D user, please let me know. Thanks. Regarding simple lambdas encoded as strings, this: sort!"a > b"(range); is just a shortcut for this: sort!((a, b) {return a > b;})(range); So Phobos offers more, not less, than a library using delegates throughout.
 Wasn't Tango an object oriented hardcore framework for large
 applications, and Phobos a procedural simple stdio wrapper for
 smaller scripts.
Probably not. Andrei
Feb 19 2010
parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-02-19 09:11:11 -0500, Andrei Alexandrescu 
<SeeWebsiteForEmail erdani.org> said:

 If you could provide a list of silly named symbols that could be a 
 dealbreaker for a prospective D user, please let me know. Thanks.
I don't think there are really any 'silly' names (except perhaps iota), it's just that many don't do exactly what you think they do on first reading. For instance, the other day I was working with input ranges and needed a way to take N elements from the range and put them aside to work on them later. So I defined my own function "take" for that. To me, "take" means you take one or more element and they aren't in the range anymore afterwards. If you look at std.range, you'll find the same function 'take', but it does its job lazily. That's great, except when you don't expect it. The name is not really silly, just not precise enough. I think there should be a clue (in the name) telling you it does its job lazily, because in general functions do what they say *when* you call them, not at a later point in time. In my case I often have to save some parts of the input for later, and any use of lazy ranges in those cases would be a bug. I think 'take' should do what it says: take N elements, and immediately, not later. I know you can write "array(take(5, range))" do do what I want, but the point is that take(5, range) alone doesn't do what you'd expect it to do at first glance, which is to take 5 elements from the range. Beside, "array(take(...))" can be wasteful sometime: for arrays (and some other ranges) you can just slice them in two parts and return the first slice, no heap allocation needed. But that optimization is harder to achieve and expect with the "array(take(...))" combination. I think this criticism applies to other parts of std.range too. I expect you'll be unwilling to change the name because however you rename it it'll be a little longer and give a less special function (the eager one) the simpler name, and that'd be boring. But most people will expect to see the less special function when seeing the simple name at first, so having it as the default makes the learning curve easier and less error-prone. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Feb 20 2010
next sibling parent Justin Johansson <no spam.com> writes:
While moving off the formal topic of the informal list of "silly names",
me thinks Michel well articulates a valid point.

Cheers
Justin


Michel Fortin wrote:
 On 2010-02-19 09:11:11 -0500, Andrei Alexandrescu 
 <SeeWebsiteForEmail erdani.org> said:
 
 If you could provide a list of silly named symbols that could be a 
 dealbreaker for a prospective D user, please let me know. Thanks.
I don't think there are really any 'silly' names (except perhaps iota), it's just that many don't do exactly what you think they do on first reading. For instance, the other day I was working with input ranges and needed a way to take N elements from the range and put them aside to work on them later. So I defined my own function "take" for that. To me, "take" means you take one or more element and they aren't in the range anymore afterwards. If you look at std.range, you'll find the same function 'take', but it does its job lazily. That's great, except when you don't expect it. The name is not really silly, just not precise enough. I think there should be a clue (in the name) telling you it does its job lazily, because in general functions do what they say *when* you call them, not at a later point in time. In my case I often have to save some parts of the input for later, and any use of lazy ranges in those cases would be a bug. I think 'take' should do what it says: take N elements, and immediately, not later. I know you can write "array(take(5, range))" do do what I want, but the point is that take(5, range) alone doesn't do what you'd expect it to do at first glance, which is to take 5 elements from the range. Beside, "array(take(...))" can be wasteful sometime: for arrays (and some other ranges) you can just slice them in two parts and return the first slice, no heap allocation needed. But that optimization is harder to achieve and expect with the "array(take(...))" combination. I think this criticism applies to other parts of std.range too. I expect you'll be unwilling to change the name because however you rename it it'll be a little longer and give a less special function (the eager one) the simpler name, and that'd be boring. But most people will expect to see the less special function when seeing the simple name at first, so having it as the default makes the learning curve easier and less error-prone.
Feb 20 2010
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Michel Fortin wrote:
 On 2010-02-19 09:11:11 -0500, Andrei Alexandrescu 
 <SeeWebsiteForEmail erdani.org> said:
 
 If you could provide a list of silly named symbols that could be a 
 dealbreaker for a prospective D user, please let me know. Thanks.
I don't think there are really any 'silly' names (except perhaps iota), it's just that many don't do exactly what you think they do on first reading.
The lengthy post below talks about _one_. If there are "many", you should be able to effortlessly list a handful.
 For instance, the other day I was working with input ranges and 
 needed a way to take N elements from the range and put them aside to 
 work on them later. So I defined my own function "take" for that.
 
 To me, "take" means you take one or more element and they aren't in the 
 range anymore afterwards.
 
 If you look at std.range, you'll find the same function 'take', but it 
 does its job lazily. That's great, except when you don't expect it.
I'd contend that _you_ don't expect it. Others may as well think it's not copying, otherwise it'd be called "takeCopy" or "setAside". At the end of the day you can't expect to fly blind through an entire library. "take" could be defined with a number of arguably good semantics. Phobos picked one. (By the way per popular request I reversed the order of arguments such that method notation works.) Andrei
Feb 20 2010
next sibling parent yigal chripun <foo bar.com> writes:
Andrei Alexandrescu Wrote:

 Michel Fortin wrote:
 On 2010-02-19 09:11:11 -0500, Andrei Alexandrescu 
 <SeeWebsiteForEmail erdani.org> said:
 
 If you could provide a list of silly named symbols that could be a 
 dealbreaker for a prospective D user, please let me know. Thanks.
I don't think there are really any 'silly' names (except perhaps iota), it's just that many don't do exactly what you think they do on first reading.
The lengthy post below talks about _one_. If there are "many", you should be able to effortlessly list a handful.
 For instance, the other day I was working with input ranges and 
 needed a way to take N elements from the range and put them aside to 
 work on them later. So I defined my own function "take" for that.
 
 To me, "take" means you take one or more element and they aren't in the 
 range anymore afterwards.
 
 If you look at std.range, you'll find the same function 'take', but it 
 does its job lazily. That's great, except when you don't expect it.
I'd contend that _you_ don't expect it. Others may as well think it's not copying, otherwise it'd be called "takeCopy" or "setAside". At the end of the day you can't expect to fly blind through an entire library. "take" could be defined with a number of arguably good semantics. Phobos picked one. (By the way per popular request I reversed the order of arguments such that method notation works.) Andrei
I think Michel raised a good point and Kenny did provide a list in a different post. I think that having lists of function names that people here don't like is silly and not productive. IMO, the problem is not in the names themselves but rather it's a bigger picture issue of lack of consistency and strict naming scheme for phobos. let's take a look at popular language that are widely used: they all have very detailed schemes which make it easier to start using the language right away which makes it easier to adopt. you _can_ look at e.g. Ruby code and have a general understanding what the code does without reading the docs. The fact of the matter is that programmers do expect to be able to get as much information as possible from the code itself before going to the docs. RTFM simply won't do. you think managers care about the code? you think they want to spend time on their programmers reading TDPL? of course not. They want the job done as quickly as possible. D is counter productive for that ATM.
Feb 20 2010
prev sibling parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-02-20 11:14:48 -0500, Andrei Alexandrescu 
<SeeWebsiteForEmail erdani.org> said:

 Michel Fortin wrote:
 I don't think there are really any 'silly' names (except perhaps iota), 
 it's just that many don't do exactly what you think they do on first 
 reading.
The lengthy post below talks about _one_. If there are "many", you should be able to effortlessly list a handful.
It takes some time to notice them as they're more subtle that just names that look wrong. I'm sure I encountered a couple of them while using Phobos, although I can't remember others right now (which might be due to me avoiding them now). If you're interested, I can dig a little. But if you're just going to dismiss the criticism by asserting they're good semantics anyway (just different that what I expect), then I'm not sure it's worth the time finding them and explaining the problem for each of them. I'd do better create my own range module and use it instead, as I already have some other reasons pushing in that direction.
 At the end of the day you can't expect to fly blind through an entire library.
I'm speaking of one function right now, not an entire library. Assuming someone knows the concept of ranges, I think a function called "take" taking a range and a length argument should be pretty obvious without looking at the documentation.
 "take" could be defined with a number of arguably good semantics.
The minimal thing I'd expect of a "take" function is that it takes something when you call it. But this one doesn't. I don't see how you can call that "good semantics". But now I wonder, what is everyone's expectation of a function called "take"? -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Feb 20 2010
parent Jonathan M Davis <jmdavisProg gmail.com> writes:
Michel Fortin wrote:

 On 2010-02-20 11:14:48 -0500, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> said:
 
 Michel Fortin wrote:
 I don't think there are really any 'silly' names (except perhaps iota),
 it's just that many don't do exactly what you think they do on first
 reading.
The lengthy post below talks about _one_. If there are "many", you should be able to effortlessly list a handful.
It takes some time to notice them as they're more subtle that just names that look wrong. I'm sure I encountered a couple of them while using Phobos, although I can't remember others right now (which might be due to me avoiding them now). If you're interested, I can dig a little. But if you're just going to dismiss the criticism by asserting they're good semantics anyway (just different that what I expect), then I'm not sure it's worth the time finding them and explaining the problem for each of them. I'd do better create my own range module and use it instead, as I already have some other reasons pushing in that direction.
 At the end of the day you can't expect to fly blind through an entire
 library.
I'm speaking of one function right now, not an entire library. Assuming someone knows the concept of ranges, I think a function called "take" taking a range and a length argument should be pretty obvious without looking at the documentation.
 "take" could be defined with a number of arguably good semantics.
The minimal thing I'd expect of a "take" function is that it takes something when you call it. But this one doesn't. I don't see how you can call that "good semantics". But now I wonder, what is everyone's expectation of a function called "take"?
Actually, take does _exactly_ what I'd expect. It functions like the take function in Haskell (where altering the list would be impossible since all variables are immutable). I think that I've seen Andrei mention stuff about Haskell stuff before, so I suspect that that's where he got it from. Honestly, I don't know how you could know for certain whether a given function alters what you pass to it ahead of time unless you look at the function signature and description in the docs. I suppose that you could make functions have names like takeConst and takeNonConst, or takeImmutable, takeMutable, or something like that to indicate whether it alters its arguments or not, but that gets ugly fast. The name take does give you a basic idea of what the function is doing, as do many function names, but when it comes down to it, you're going to have to read the docs to know exactly what a function does. I don't see any way around that. Picking names which give a clear indication of what a function does helps a lot, but in the end, you have to look up exactly what they do if you want to know for sure. - Jonathan M Davis
Feb 20 2010
prev sibling next sibling parent reply Gareth Charnock <gareth oerc.ox.ac.uk> writes:
dave eveloper wrote:
 Ezneh Wrote:
 
 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was designed by
larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b. Wasn't Tango an object oriented hardcore framework for large applications, and Phobos a procedural simple stdio wrapper for smaller scripts. I think it wouldn't be so bad if there was a "Mini-d" dialect of D that has focus on massive libraries and enterprise support.
Nooooooooo!!! I think the above is the only way to succinctly express my opinions about forking. Yes the extra "o"'s and exclamation marks are needed! ;-) There is nothing wrong with having two "standard", compatible libraries. It's kind of like having two libraries except you can always rely on them being there. Having libraries you can rely on is without having to worry about the download-build-install-add-to-makefile cycle is a good thing, especially while learning a language. And D needs all the libraries it can get its hands on. Problems occur when two incompatible "standard" libraries exist, as has been apparent, but the should be fixed soon. In fact, I would say that making tango and phobos run together out of the box is probably one of the most important features of D2 if not the most important. But two compatible libraries? It means you can choose which one suits you best, and if a library you are using uses the other, well that's there choice. Perhaps you use mostly phobos but then use tango for XML (which I hear is very fast). I guess I can summarise my position as: 2 > 1
Feb 19 2010
parent reply retard <re tard.com.invalid> writes:
Fri, 19 Feb 2010 20:38:02 +0000, Gareth Charnock wrote:

 But two compatible libraries? It means you can choose which one suits
 you best, and if a library you are using uses the other, well that's
 there choice. Perhaps you use mostly phobos but then use tango for XML
 (which I hear is very fast).
I doubt full compatibility can be achieved. E.g. using collection data structures from Tango and collection algorithms from Phobos. The compatibility is on core features and on binary level - you can mix in the both libraries, but it won't be enough to make code portable and reusable between the frameworks.
Feb 19 2010
parent Bane <branimir.milosavljevic gmail.com> writes:
Variety is good. If they have different purpose, merging them might not be
good? Anyway, 2 is better than 3.
Feb 19 2010
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"dave eveloper" <tango land.net> wrote in message 
news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was designed by 
 larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
 Wasn't Tango an object oriented hardcore framework for large applications, 
 and Phobos a procedural simple stdio wrapper for smaller scripts. I think 
 it wouldn't be so bad if there was a "Mini-d" dialect of D that has focus 

 like massive libraries and enterprise support.
One of the charters for my SemiTwist D Tools project ( www.dsource.org/projects/semitwist ) is to provide wrappers for Tango's approach for when you just need something simple. As an example, just the other day I added "readUnicodeFile" that wraps tango's File.get and UnicodeBom stuff to provide a single no-mess function to load a text file written in any UTF format and auto-convert into native-endian UTF-8, 16, or 32, as desired. (Of course, if Tango wants to adopt any of SemiTwist D Tools into itself, I'm all for it.)
Feb 19 2010
parent reply Justin Johansson <no spam.com> writes:
Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message 
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was designed by 
 larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations. That's tantamount to what you are saying. imho, use of "silly" words like this in the language are a retrograde step. Cheers Justin Johansson
Feb 19 2010
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Justin Johansson wrote:
 Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message 
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was 
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations.
My understanding is that he included it to clarify that it's an appropriate word, not to explain a rare word such as "nefandous".
 That's tantamount to what you are saying.  imho, use of "silly"
 words like this in the language are a retrograde step.
This is the third time I'm asking: what is a list of allegedly silly names in phobos? Far as I can tell the case against "retro" and "iota" is rather tenuous. So what are others? readText? topN? setDifference? Talk to me. Andrei
Feb 19 2010
next sibling parent Justin Johansson <no spam.com> writes:
Andrei Alexandrescu wrote:
 
 This is the third time I'm asking: what is a list of allegedly silly 
 names in phobos? Far as I can tell the case against "retro" and "iota" 
 is rather tenuous. So what are others? readText? topN? setDifference? 
 Talk to me.
For me, and just my opinion even though others may agree the case against them is tenuous as you say, "retro" and "iota" are the main odd balls. My comment was a broadside against retro; not against a wider list of names. In fairness to Andrei, sounds like he is seriously listening for further allegations so now is the time to speak up if you wish to be heard on the matter of names in phobos. Cheers Justin
Feb 19 2010
prev sibling next sibling parent reply Rainer Deyke <rainerd eldwood.com> writes:
Andrei Alexandrescu wrote:
 This is the third time I'm asking: what is a list of allegedly silly
 names in phobos? Far as I can tell the case against "retro" and "iota"
 is rather tenuous. So what are others? readText? topN? setDifference?
 Talk to me.
"retro" is unusual, but at least I know what it means. I may not like it, but I can use it. "iota" is horrible. The last ten times I saw "iota", it was a typo of "itoa". Like all Greek letters, 'Κ' is used as a shorthand for all kinds of different meanings in different fields of science and mathematics. It's a useful shorthand because it's a single letter. Spelling it out as "iota" wastes space without disambiguating between all the different possible meanings of 'Κ'. If you're going to go for a single-letter name, "i" is better than "iota". It's just as arbitrary, it's just as ambiguous, I have just as little idea what it means, but it's shorter to write, and you don't need to know the English names of Greek letters to recognize it. -- Rainer Deyke - rainerd eldwood.com
Feb 19 2010
next sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Rainer Deyke wrote:
 Andrei Alexandrescu wrote:
 This is the third time I'm asking: what is a list of allegedly silly
 names in phobos? Far as I can tell the case against "retro" and "iota"=
 is rather tenuous. So what are others? readText? topN? setDifference?
 Talk to me.
=20 "retro" is unusual, but at least I know what it means. I may not like it, but I can use it. =20 "iota" is horrible. The last ten times I saw "iota", it was a typo of "itoa". Like all Greek letters, '=CE=B9' is used as a shorthand for al=
l
 kinds of different meanings in different fields of science and
 mathematics.  It's a useful shorthand because it's a single letter.
 Spelling it out as "iota" wastes space without disambiguating between
 all the different possible meanings of '=CE=B9'.
=20
 If you're going to go for a single-letter name, "i" is better than
 "iota".  It's just as arbitrary, it's just as ambiguous, I have just as=
 little idea what it means, but it's shorter to write, and you don't nee=
d
 to know the English names of Greek letters to recognize it.
=20
Plus, "iota" doesn't mean what it does. According to the dictionary (Collins Cobuild): "An *iota* of something is an extremely small amount of it. EG I don't feel one iota of guilt... The buyer would not go one iota higher... You know, I don't think you've changed an iota." What's the relation with stepping through a range at fixed intervals? A much better name would be "step": it's the same length and it says exactly what it means. Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 20 2010
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Rainer Deyke wrote:
 Andrei Alexandrescu wrote:
 This is the third time I'm asking: what is a list of allegedly silly
 names in phobos? Far as I can tell the case against "retro" and "iota"
 is rather tenuous. So what are others? readText? topN? setDifference?
 Talk to me.
"retro" is unusual, but at least I know what it means. I may not like it, but I can use it. "iota" is horrible. The last ten times I saw "iota", it was a typo of "itoa". Like all Greek letters, 'Κ' is used as a shorthand for all kinds of different meanings in different fields of science and mathematics. It's a useful shorthand because it's a single letter. Spelling it out as "iota" wastes space without disambiguating between all the different possible meanings of 'Κ'. If you're going to go for a single-letter name, "i" is better than "iota". It's just as arbitrary, it's just as ambiguous, I have just as little idea what it means, but it's shorter to write, and you don't need to know the English names of Greek letters to recognize it.
"iota" is already present with the same semantics in 1.25 languages: C++ and Go. Anyhow, what's a better name? Andrei
Feb 20 2010
next sibling parent reply Rainer Deyke <rainerd eldwood.com> writes:
Andrei Alexandrescu wrote:
 "iota" is already present with the same semantics in 1.25 languages: C++
 and Go.
I've never used or encountered it in C++. Either it's useless (in which case it should be dropped), or its name keeps it from being used.
 Anyhow, what's a better name?
Since I still don't know what it does, I can't answer that question. -- Rainer Deyke - rainerd eldwood.com
Feb 20 2010
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Rainer Deyke wrote:
 Andrei Alexandrescu wrote:
 "iota" is already present with the same semantics in 1.25 languages: C++
 and Go.
I've never used or encountered it in C++. Either it's useless (in which case it should be dropped), or its name keeps it from being used.
The story is different; iota was one of few functions that Stepanov defined after the standard process had ended. It's present in most implementations as an extension. It's not used as often as it could because it's more awkward with iterators than with ranges.
 Anyhow, what's a better name?
Since I still don't know what it does, I can't answer that question.
http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota Andrei
Feb 20 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
Andrei Alexandrescu wrote:
 Rainer Deyke wrote:
 Andrei Alexandrescu wrote:
 Anyhow, what's a better name?
Python calls it 'range':
 range(1, 5)
range(1, 5)
 list(range(1, 5))
[1, 2, 3, 4]
 list(range(1, 5, 2))
[1, 3] I like 'range'. It's short, it's descriptive, it's immediately recognizable to someone new to the language. You could argue that calling this function 'range' would lead to confusion between the range concept and the range function. In that case, you could add a verb and call the function 'makeRange'. Alternately, if the function is only meant to take numeric arguments, then 'numericRange' could help distinguish it from other functions that return ranges. However, I think that 'range' by itself is sufficiently clear and unambiguous. -- Rainer Deyke - rainerd eldwood.com
Feb 20 2010
parent reply Jonathan M Davis <jmdavisProg gmail.com> writes:
Rainer Deyke wrote:

 Andrei Alexandrescu wrote:
 Rainer Deyke wrote:
 Andrei Alexandrescu wrote:
 Anyhow, what's a better name?
Python calls it 'range':
 range(1, 5)
range(1, 5)
 list(range(1, 5))
[1, 2, 3, 4]
 list(range(1, 5, 2))
[1, 3] I like 'range'. It's short, it's descriptive, it's immediately recognizable to someone new to the language. You could argue that calling this function 'range' would lead to confusion between the range concept and the range function. In that case, you could add a verb and call the function 'makeRange'. Alternately, if the function is only meant to take numeric arguments, then 'numericRange' could help distinguish it from other functions that return ranges. However, I think that 'range' by itself is sufficiently clear and unambiguous.
I think that makeRange or range would be _highly_ confusing given how the term range is used in D, and personally, I wouldn't find it much clearer anyway. And can python's range allow for steps greater than 1 between numbers? It's not simply the range of numbers between the first and second number given. It's the range of numbers with a given step size between each number. So, it's not really a range. I agree that iota is a rather bizarre name, but I haven't a clue what to call it. The function is already complicated enough that it really needs examples to figure out what it's doing. I certainly can't think of a name which comes close to accurately describing what it's doing. And anything with range in the name would just increase the confusion. I tend to agree with Michel in that it's better to have a name which is not immediately obvious but which _is_ memorable. That way, you have to look it up and actually understand it. And then you'll remember it. Unless a name can be found which makes it crystal clear what it does, I think that it's far better to just leave it as iota. And if there are other languages which already use iota for a function which does this, then it makes that much more sense to stick with the name. Then it _will_ be clear to people who have seen it in other languages. No, iota is not the best name ever, but I think that it should be left as it is. - Jonathan M Davis
Feb 20 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 2/20/2010 19:55, Jonathan M Davis wrote:
 I think that makeRange or range would be _highly_ confusing given how the 
 term range is used in D, and personally, I wouldn't find it much clearer 
 anyway.
'makeRange' is descriptive. That's what the function does. It creates and returns a range, in the D sense of the word "range".
 And can python's range allow for steps greater than 1 between 
 numbers?
Yes. I even included an example of that in my previous post. -- Rainer Deyke - rainerd eldwood.com
Feb 20 2010
parent reply Jonathan M Davis <jmdavisProg gmail.com> writes:
Rainer Deyke wrote:

 On 2/20/2010 19:55, Jonathan M Davis wrote:
 I think that makeRange or range would be _highly_ confusing given how the
 term range is used in D, and personally, I wouldn't find it much clearer
 anyway.
'makeRange' is descriptive. That's what the function does. It creates and returns a range, in the D sense of the word "range".
Well, technically speaking, it returns a Sequence, but a Sequence is a range. In that case, perhaps makeSequence or genSequence would work.
 
 And can python's range allow for steps greater than 1 between
 numbers?
Yes. I even included an example of that in my previous post.
Too true. I thought that I had looked, but apparently I wasn't observant enough. Sorry about that. I still question that it's wise to use range or makeRange in this case though. I don't know. I find iota to be a fairly bizarre name, bit it's highly memorable. I'll remember it far more easily than I would something like makeSequence or makeRange. And the fact that iota is used for this purpose in other languages certainly gives substance to the argument for keeping it - though just because another language does something in a particular manner doesn't mean that D should. - Jonathan M Davis
Feb 20 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 2/20/2010 20:44, Jonathan M Davis wrote:
 Rainer Deyke wrote:
 'makeRange' is descriptive.  That's what the function does.  It creates
 and returns a range, in the D sense of the word "range".
Well, technically speaking, it returns a Sequence, but a Sequence is a range. In that case, perhaps makeSequence or genSequence would work.
'makeSequence' and 'genSequence' both work for me. -- Rainer Deyke - rainerd eldwood.com
Feb 21 2010
parent reply Jonathan M Davis <jmdavisProg gmail.com> writes:
Rainer Deyke wrote:

 On 2/20/2010 20:44, Jonathan M Davis wrote:
 Rainer Deyke wrote:
 'makeRange' is descriptive.  That's what the function does.  It creates
 and returns a range, in the D sense of the word "range".
Well, technically speaking, it returns a Sequence, but a Sequence is a range. In that case, perhaps makeSequence or genSequence would work.
'makeSequence' and 'genSequence' both work for me.
If I had to pick one, I'd go for genSequence since I prefer the idea of "generating" a sequence to "making" one. I do like ioto for it's memorability though. I'll remember it _far_ more easily than genSequence or makeSequence. But it _is_ a case where the name effectively has nothing to do with the function itself, which is generally a bad idea. Of course, there are plenty of other things in Computer Science like that - like string - but they're generally known and iota isn't. At this point, if we _have_ to change iota, then I'd go for genSequence, but it's fine with me if it stays. - Jonathan M Davis
Feb 21 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 2/21/2010 17:42, Jonathan M Davis wrote:
 Rainer Deyke wrote:
 If I had to pick one, I'd go for genSequence since I prefer the idea of 
 "generating" a sequence to "making" one. I do like ioto for it's 
 memorability though.
The memorability of iota doesn't scale. There are 24 letters in the Greek alphabet. Imagine that each one was assigned a different function in D. Would iota still be memorable next to eta and zeta? Would you remember the difference between nu and mu, between eplison and upsilon? 'iota' is memorable to you not because it's a good name, but because it stands out. Out of any set of items, only a small subset can stand out. A name that stands out is more memorable because it attracts attention, but that attention is pulled away from other names. Therefore, the name 'iota' makes the rest of Phobos harder to learn, even if you never use 'iota'. -- Rainer Deyke - rainerd eldwood.com
Feb 21 2010
parent reply Jonathan M Davis <jmdavisProg gmail.com> writes:
Rainer Deyke wrote:

 On 2/21/2010 17:42, Jonathan M Davis wrote:
 Rainer Deyke wrote:
 If I had to pick one, I'd go for genSequence since I prefer the idea of
 "generating" a sequence to "making" one. I do like ioto for it's
 memorability though.
The memorability of iota doesn't scale. There are 24 letters in the Greek alphabet. Imagine that each one was assigned a different function in D. Would iota still be memorable next to eta and zeta? Would you remember the difference between nu and mu, between eplison and upsilon?
Oh, I wouldn't try and scale it, and I certainly wouldn't suggest naming other functions so poorly. It's just iota _already_ has that name (and that name is used for such in other languages to boot), so there's some advantage in leaving it as is. However, regardless of whether it's a good idea to leave it as iota, I certainly wouldn't suggest going out and naming other functions with such obscure/unrelated names. That would definitely make things worse.
 'iota' is memorable to you not because it's a good name, but because it
 stands out.  Out of any set of items, only a small subset can stand out.
  A name that stands out is more memorable because it attracts attention,
 but that attention is pulled away from other names.  Therefore, the name
 'iota' makes the rest of Phobos harder to learn, even if you never use
 'iota'.
I don't see how iota makes the rest of phobos harder to learn. It's one poorly named function. All the rest could have brilliant names or absolutely horrific names, and iota wouldn't really have any impact on them either way. Sure, it draws attention, but that doesn't make more sensible names any more or less clear. I can see changing iota's name because it has nothing to do with what the function does, but I can't see changing it because it makes the rest of phobos harder to learn. I just don't see the connection. When it comes down to it, a good deal of the problem is that the best a function name can do is give you an idea of what the function does. It's quite rare that it tells you _exactly_ what it does, making it so that you never have to look at the documentation to be sure. In any case, I'm fine with iota being changed to genSequence or some other reasonably descriptive name, but I'm also fine with it staying it is simply because it's easy to remember, and the function is complicated enough that the name won't really tell you what it's doing anyway. - Jonathan M Davis
Feb 21 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 2/21/2010 23:07, Jonathan M Davis wrote:
 I don't see how iota makes the rest of phobos harder to learn. It's one 
 poorly named function. All the rest could have brilliant names or absolutely 
 horrific names, and iota wouldn't really have any impact on them either way. 
Function names don't exist in isolation. A consistent naming scheme makes all names that use that scheme easier to learn. Adding an inconsistently named function to a set of consistently named functions doesn't just make that function harder to learn, but it obscures the naming scheme. The effect of a single poorly named function may seem insignificant, but the cumulative effect of a hundred poorly named function is huge. -- Rainer Deyke - rainerd eldwood.com
Feb 21 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Rainer Deyke wrote:
 On 2/21/2010 23:07, Jonathan M Davis wrote:
 I don't see how iota makes the rest of phobos harder to learn. It's one 
 poorly named function. All the rest could have brilliant names or absolutely 
 horrific names, and iota wouldn't really have any impact on them either way. 
Function names don't exist in isolation. A consistent naming scheme makes all names that use that scheme easier to learn. Adding an inconsistently named function to a set of consistently named functions doesn't just make that function harder to learn, but it obscures the naming scheme. The effect of a single poorly named function may seem insignificant, but the cumulative effect of a hundred poorly named function is huge.
I agree. One issue with this thread has been that it has quickly devolved in empty assertions of objectivity built on top of personal preferences. There's also a lot of rhetoric spent on solid naming schemes, but I see as many schemes as proposers. Mentioning that a naming scheme is good, no matter how eloquently, is restating the obvious. The challenge is devising an actual naming scheme that catches existing functionality and future functionality. The latter is difficult as there is virtually no prior work on D-like ranges so a lot of the territory is uncharted. Besides, if we agree that conventions like e.g. enclitic "d" or everything that "generates" must start with "gen", I don't think that's a huge step forward: (a) whatever comes after "gen" must also be agreed on, (b) there are and will be quite a few ranges that are only borderline "gen" and I don't want to smother future designs, (c) natural language irregularity works against consistent enclitics (e.g. "reverse"/"reversed" works great, but "split"/"splat" not as great) or existential prefix "is". Andrei
Feb 22 2010
prev sibling next sibling parent reply Norbert Nemec <Norbert Nemec-online.de> writes:
Andrei Alexandrescu wrote:
 "iota" is already present with the same semantics in 1.25 languages: C++ 
 and Go. Anyhow, what's a better name?
For me, a Google search for "C++ iota" only returns discussions about whether such a function actually exists in the STL. Is it really in the standard? Anyway: Looking at the definition of ĂŻota in Phobos, it simply seems to be a slicing operation with a stride. Most intuitive to me would be to rename the function to "slice" and the option step to "stride"?
Feb 20 2010
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Norbert Nemec wrote:
 Andrei Alexandrescu wrote:
 "iota" is already present with the same semantics in 1.25 languages: 
 C++ and Go. Anyhow, what's a better name?
For me, a Google search for "C++ iota" only returns discussions about whether such a function actually exists in the STL. Is it really in the standard?
It's not in the standard (and I haven't claimed so). It's commonly present as an extension.
 Anyway: Looking at the definition of ĂŻota in Phobos, it simply seems to 
 be a slicing operation with a stride. Most intuitive to me would be to 
 rename the function to "slice" and the option step to "stride"?
iota(0, 10, 2) generates the numbers 0, 2, 4, 6, 8. http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota The name "stride" is currently used by a range adaptor that takes a range and walks it with a given stride. stride([1, 2, 3], 2) generates 1 and 2. http://www.digitalmars.com/d/2.0/phobos/std_range.html#stride BTW stride iterators are mentioned by Stepanov: http://www.stlport.org/resources/StepanovUSA.html Andrei
Feb 20 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Andrei Alexandrescu wrote:
 Norbert Nemec wrote:
 Andrei Alexandrescu wrote:
 "iota" is already present with the same semantics in 1.25 languages: 
 C++ and Go. Anyhow, what's a better name?
For me, a Google search for "C++ iota" only returns discussions about whether such a function actually exists in the STL. Is it really in the standard?
It's not in the standard (and I haven't claimed so). It's commonly present as an extension.
 Anyway: Looking at the definition of ĂŻota in Phobos, it simply seems 
 to be a slicing operation with a stride. Most intuitive to me would be 
 to rename the function to "slice" and the option step to "stride"?
iota(0, 10, 2) generates the numbers 0, 2, 4, 6, 8. http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota The name "stride" is currently used by a range adaptor that takes a range and walks it with a given stride. stride([1, 2, 3], 2) generates 1 and 2.
1 and 3, sorry. Andrei
Feb 20 2010
prev sibling next sibling parent Michel Fortin <michel.fortin michelf.com> writes:
On 2010-02-20 11:04:36 -0500, Andrei Alexandrescu 
<SeeWebsiteForEmail erdani.org> said:

 "iota" is already present with the same semantics in 1.25 languages: 
 C++ and Go. Anyhow, what's a better name?
"iota" is perhaps a silly looking name, but at least you're not bound to confuse it with something else. It's always better to have names you don't understand (forcing you to look at the doc) than names you understand subtly wrong (which might introduce bugs). The best way to get rid of iota would be to replace it with the same syntax the language already use elsewhere: 1..10 Like ruby does with its range operator[^1]. But that's not so simple as changing a name... [^1]: http://ruby-doc.org/core/classes/Range.html -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Feb 20 2010
prev sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Andrei Alexandrescu wrote:
 Rainer Deyke wrote:
 If you're going to go for a single-letter name, "i" is better than
 "iota".  It's just as arbitrary, it's just as ambiguous, I have just a=
s
 little idea what it means, but it's shorter to write, and you don't ne=
ed
 to know the English names of Greek letters to recognize it.
=20 "iota" is already present with the same semantics in 1.25 languages: C+=
+
 and Go. Anyhow, what's a better name?
=20
Just because C++ and Go made a mistake is no reason to make the same mistake in D. You're still not addressing the fact that std.range.iota does not match the dictionary definition of iota... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 21 2010
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message 
news:hlnl2t$1oif$1 digitalmars.com...
 Justin Johansson wrote:
 Nick Sabalausky wrote:
 Dictionary.com Unabridged, Based on the Random House Dictionary:

 retro-

 a prefix occurring in loanwords from Latin meaning “backward” 
 (retrogress); on this model, used in the formation of compound words 
 (retrorocket).

 So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations.
My understanding is that he included it to clarify that it's an appropriate word, not to explain a rare word such as "nefandous".
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. And as far as being latin: In english, even people (like me) who have gone nowhere near a latin class or even some "learn latin in 10 easy steps" book in their life are still generally familiar with not only the retro- prefix, but a whole bunch of other latin-derived things as well (like bi-, tri-, feline, etc.). Heck most english speakers don't even know that stuff is latin, they just think assume its english. And that's even despite the fact that there's other languages that are even far more latin-influenced then english is. Latin, as itself, may be a dead language, but a lot of it still exists in many modern languages.
Feb 20 2010
parent reply Justin Johansson <no spam.com> writes:
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 live in a house with a single carriage driveway. This morning my wife's car was parked nearer the street (lest I be ambiguous and say behind/retro mine). As I was in a hurry for an appointment, I kindly asked my dear wife to retro(*) her car out of the driveway. (*) using new meening lerned sinz practizing my Inglish from lesions learned from D language newsgroup. This evening my wife arrives back with a new BMW and a bill for $39,999 on my GE Credit and she says to me "I'm so pleased you eventually agreed to retro my car." Listen guys. "retro" in English, and given it's post-classical Latin roots does not mean the same as "reverse". "retro" is largely about going back to a past epoch in time, though not necessarily in a "reverse" or "descending" manner. There is a distinction of enormous manifest between the words "reverse" and "retro". -- Justin Johansson
Feb 20 2010
next sibling parent Justin Johansson <no spam.com> writes:
Justin Johansson wrote:
 What about persons with English not as a first language?
 
 I live in a house with a single carriage driveway.
 
 This morning my wife's car was parked nearer the street (lest I be 
 ambiguous and say behind/retro mine).
 
I omitted to say that my wife's first language is Italian.
Feb 20 2010
prev sibling next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sun, Feb 21, 2010 at 12:15:30AM +1030, Justin Johansson wrote:
 Listen guys.  "retro" in English, and given it's post-classical Latin
 roots does not mean the same as "reverse". 
The only difference I've ever heard is reverse is a verb, and retro is an adjective. retro rocket = rockets that fire in reverse retrograde = an orbit that goes in reverse If it had to change, the next best thing would probably be inReverse(); Do people find that agreeable? -- Adam D. Ruppe http://arsdnet.net
Feb 20 2010
parent reply Justin Johansson <no spam.com> writes:
Adam D. Ruppe wrote:
 On Sun, Feb 21, 2010 at 12:15:30AM +1030, Justin Johansson wrote:
 Listen guys.  "retro" in English, and given it's post-classical Latin
 roots does not mean the same as "reverse". 
The only difference I've ever heard is reverse is a verb, and retro is an adjective. retro rocket = rockets that fire in reverse retrograde = an orbit that goes in reverse If it had to change, the next best thing would probably be inReverse(); Do people find that agreeable?
Notwithstanding the untruth or otherwise of the following statement, how sounds the semantics? "Using D as a programming language is retrograde to using C++." Does the writer of that statement actually mean reverse? Cheers Justin Johansson
Feb 20 2010
parent "Nick Sabalausky" <a a.a> writes:
"Justin Johansson" <no spam.com> wrote in message 
news:hlostp$v2r$1 digitalmars.com...
 Adam D. Ruppe wrote:
 On Sun, Feb 21, 2010 at 12:15:30AM +1030, Justin Johansson wrote:
 Listen guys.  "retro" in English, and given it's post-classical Latin
 roots does not mean the same as "reverse".
The only difference I've ever heard is reverse is a verb, and retro is an adjective. retro rocket = rockets that fire in reverse retrograde = an orbit that goes in reverse If it had to change, the next best thing would probably be inReverse(); Do people find that agreeable?
Notwithstanding the untruth or otherwise of the following statement, how sounds the semantics? "Using D as a programming language is retrograde to using C++." Does the writer of that statement actually mean reverse?
I've read enough babelfish and google translations that if I saw a statement like that, I would assume it was a non-native english speaker (of questionable programming langauge preferences) calling D a step backwards from C++.
Feb 20 2010
prev sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Justin Johansson" <no spam.com> wrote in message 
news:hlop1u$o1m$1 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.
Feb 20 2010
next sibling parent reply Justin Johansson <no spam.com> writes:
Nick Sabalausky wrote:
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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.
One famous mathematician, in writing to another famous mathematician, once wrote "I apologize for the length of this letter, but I don't have time to be brief". So question is, are you the former famous mathematician?
Feb 20 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Justin Johansson" <no spam.com> wrote in message 
news:hlov1c$12sr$1 digitalmars.com...
 Nick Sabalausky wrote:
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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.
One famous mathematician, in writing to another famous mathematician, once wrote "I apologize for the length of this letter, but I don't have time to be brief". So question is, are you the former famous mathematician?
Heh :) No, but one time I did have a college professor refer to my writing style as "constipated". Can't say I disagreed ;)
Feb 20 2010
parent Justin Johansson <no spam.com> writes:
Nick Sabalausky wrote:
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlov1c$12sr$1 digitalmars.com...
 Nick Sabalausky wrote:
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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.
One famous mathematician, in writing to another famous mathematician, once wrote "I apologize for the length of this letter, but I don't have time to be brief". So question is, are you the former famous mathematician?
Heh :) No, but one time I did have a college professor refer to my writing style as "constipated". Can't say I disagreed ;)
Oh, Nick, that's a bit unkind of your prof; in any case I don't see a connection between "constipated" and "voluminous". Keep on writing; you have an amusing style as well as the occasional valid point :-)
Feb 20 2010
prev sibling next sibling parent reply yigal chripun <foo bar.com> writes:
Nick Sabalausky Wrote:

 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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?
Feb 20 2010
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
yigal chripun wrote:
 Nick Sabalausky Wrote:
 
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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
Feb 20 2010
next sibling parent reply yigal chripun <foo bar.com> writes:
Andrei Alexandrescu Wrote:

 yigal chripun wrote:
 Nick Sabalausky Wrote:
 
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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.
Feb 20 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
yigal chripun wrote:
 Andrei Alexandrescu Wrote:
 
 yigal chripun wrote:
 Nick Sabalausky Wrote:
 
 "Justin Johansson" <no spam.com> wrote in message 
 news:hlop1u$o1m$1 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.
Well that doesn't quite set up the stage nicely for a dialog. I explained you what constraints I was under when choosing one particular name. You then ignore the entire explanation by labeling me as illogically stubborn. At the same time, you keep on waxing indignant about a very general problem with Phobos but consistently omit to provide more supporting evidence than "retro" and "iota".
 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.
I agree that Phobos, being a palimpsest[1] on which several people wrote, currently mixes a number of styles and names. Would be great if you added some concrete details that would help us improve things. What would be a good example of Phobos code that is currently next to incomprehensible due to poor choices of names, and what would be a good consistent naming scheme that would improve on that? Andrei [1] The nerve!
Feb 20 2010
prev sibling parent KennyTM~ <kennytm gmail.com> writes:
On Feb 21, 10 01:03, Andrei Alexandrescu wrote:
 yigal chripun wrote:
 Nick Sabalausky Wrote:

 "Justin Johansson" <no spam.com> wrote in message
 news:hlop1u$o1m$1 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;
Isn't Array.reverse going to be deprecated?
 (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;
I agree the difference is subtle. I propose retro -> reverse reverse -> inPlaceReverse (In ObjC retro will be called reversedRange or rangeByReversingRange :p The, well, advantage is no one will confuse what's going on.)
 (c) I was looking for a short name because I presume the function will
 be used often;
Out of my previous programs in any languages I've seldom used foreach_reverse or its equivalent. And we all use string very often yet anyone wants to look for a very short name e.g. str? I mean, retro is only 3 characters shorter than reversed or backward.
 (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
Feb 20 2010
prev sibling parent "Nick Sabalausky" <a a.a> writes:
"yigal chripun" <foo bar.com> wrote in message 
news:hlp3g1$1aq2$1 digitalmars.com...
 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?
I certainly consider "reverse" to be a better name than "retro". No argument from me there. What I'm saying is just that I think people are making it out to be a much bigger issue than it really is. (Now, "iota", on the other hand...)
Feb 20 2010
prev sibling parent reply biozic <dransic free.fr> writes:
Le 20/02/10 16:17, Nick Sabalausky a ĂŠcrit :
 "Justin Johansson"<no spam.com>  wrote in message
 news:hlop1u$o1m$1 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.
As a non-native english speaker, when I want to use a function I don't know the name of, and when I'm browsing the documentation, I must say that my heuristic reading overlooks things like "iota" (and perhaps "retro" as well) in favor of more descriptive function names. But what I really miss is a good search engine for the documentation, not a function name that is perfectly relevant to my understanding. A list of well-chosen keywords/tags associated with every function should do the work (more than the present full-text search). Then, when I type something like "range generate step", I would get a (preferably small) list of functions, among which "iota" -- and I would be statisfied. Nicolas
Feb 21 2010
parent biozic <dransic free.fr> writes:
Le 21/02/10 13:17, biozic a ĂŠcrit :
 But what I really miss is a good search engine for the documentation,
 not a function name that is perfectly relevant to my understanding. A
 list of well-chosen keywords/tags associated with every function should
 do the work (more than the present full-text search). Then, when I type
 something like "range generate step", I would get a (preferably small)
 list of functions, among which "iota" -- and I would be statisfied.

 Nicolas
I can see that this is actually being taken care of!! Great!
Feb 21 2010
prev sibling next sibling parent reply KennyTM~ <kennytm gmail.com> writes:
On Feb 20, 10 11:31, Andrei Alexandrescu wrote:
 Justin Johansson wrote:
 Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations.
My understanding is that he included it to clarify that it's an appropriate word, not to explain a rare word such as "nefandous".
 That's tantamount to what you are saying. imho, use of "silly"
 words like this in the language are a retrograde step.
This is the third time I'm asking: what is a list of allegedly silly names in phobos? Far as I can tell the case against "retro" and "iota" is rather tenuous. So what are others? readText? topN? setDifference? Talk to me. Andrei
Major silly names: - std.file.slurp - std.iterator.retro, std.range.retro - std.random.dice (it is a discrete distribution...) - std.range.cons - std.range.iota - std.string.chomp, chompPrefix, chop - std.string.munch - std.string.sformat - std.utf.stride (which is totally different from std.range.stride) Minor annoyances: - std.contracts.enforceEx (sounds like Win32 API which you should use in favor of enforce.) - std.path.rel2abs (why not relToAbs?) - std.range.sameHead (should be sameFront?) - std.stream.Stream.readBlock & writeBlock (sounds like blocking vs non-blocking operations, esp. for SocketStream.) - and many inconsistent naming conventions, e.g. * std.string.ljustify vs stripl * std.string.countchars (all lower) vs inPattern (CamelCase)
Feb 20 2010
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
Let's try to get some alternative names proposed so maybe we can reach
a compromise. I say we throw stuff out there and see what sticks.


  Side note: there should be some magic thing that lets you punch in
  a symbol, and immediately go to the docs.

  Actually, I'll do it now.

  http://arsdnet.net/dcode/find.php

  Source at the bottom of this message.

On Sat, Feb 20, 2010 at 10:16:48PM +0800, KennyTM~ wrote:
 Major silly names:
 
  - std.file.slurp
formattedReadAll? Not quite the same as readf() (as in opposite of writef), but close.
  - std.iterator.retro, std.range.retro
inReverse()
  - std.random.dice (it is a discrete distribution...)
proportional()
  - std.range.cons
prepend()
  - std.range.iota
step()
  - std.string.chomp, chompPrefix, chop
cutOffEnd, cutOffBeginning, cutOffTrailingNewline blargh, I really prefer chomp to those.
  - std.string.munch
skipPattern() eat() <- probably what I would have called it in my own code...
  - std.string.sformat
I've never even wanted to do that; let a performance optimization keep its little name.
  - std.utf.stride (which is totally different from std.range.stride)
sequenceLength?
  - std.contracts.enforceEx (sounds like Win32 API which you should use 
 in favor of enforce.)
Can it be combined into enforce, using a default parameter for the exception?
  - std.stream.Stream.readBlock & writeBlock (sounds like blocking vs 
 non-blocking operations, esp. for SocketStream.)
I like these, but maybe readDataBlock? What I'd prefer to do is if there are blocking vs nonblocking, use readBlocking -- the 'ing' would be important. Or better yet make it a parameter passed in.
  - std.path.rel2abs (why not relToAbs?)
  - std.range.sameHead (should be sameFront?)
  - and many inconsistent naming conventions, e.g.
     * std.string.ljustify vs stripl
     * std.string.countchars (all lower) vs inPattern (CamelCase)
Agreed on these. find.php source ================= <?php if(isset($_GET['symbol'])) { $version = $_GET['version'] == '2.0' ? '2.0' : '1.0'; $name = strtolower($_GET['symbol']); $name = preg_replace('[^a-z0-9_\.]', '', $name); $module = substr($name, 0, strrpos($name, '.')); $function = substr($name, strrpos($name, '.') + 1); $module = str_replace('.', '_', $module); $url = header("Location: $url"); //echo $url; exit; } ?> <html> <head> <title>Find D Symbol</title> </head> <body onload="document.getElementById('symbol').focus();"> <h1>D Doc finder</h1> <p>Enter the full name of the symbol in here. Example: <tt>std.file.read</tt> or <tt>std.string.indexOf</tt>.</p> <table> <form> <tr> <th>D version</th> <td><input name="version" value="1.0" type="radio" /> 1.0 <br><input name="version" value="2.0" checked type="radio" /> 2.0 </tr> <tr> <th>Symbol:</th> <td><input id="symbol" name="symbol" size="40" /></td> </tr> <tr> <th>&nbsp;</th> <td><input type="submit" value="Go to" /></td> </tr> </form> </table> </body> </html> ================ -- Adam D. Ruppe http://arsdnet.net
Feb 20 2010
next sibling parent reply =?ISO-8859-1?Q?Pelle_M=E5nsson?= <pelle.mansson gmail.com> writes:
On 02/20/2010 04:34 PM, Adam D. Ruppe wrote:
    Side note: there should be some magic thing that lets you punch in
    a symbol, and immediately go to the docs.

    Actually, I'll do it now.

    http://arsdnet.net/dcode/find.php

    Source at the bottom of this message.
Wonderful!
 On Sat, Feb 20, 2010 at 10:16:48PM +0800, KennyTM~ wrote:
 Major silly names:

   - std.file.slurp
formattedReadAll? Not quite the same as readf() (as in opposite of writef), but close.
Ew. I like slurp more. I find slurp to be an excellent name, actually.
   - std.range.cons
prepend()
And stop calling first() car()? And rest() cdr()? Where will the madness end?
   - std.string.munch
skipPattern() eat()<- probably what I would have called it in my own code...
munch is better than eat, in my opinion. I like munch.
Feb 20 2010
parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sat, Feb 20, 2010 at 05:08:55PM +0100, Pelle Mĺnsson wrote:
 Wonderful!
Now also up at http://dpldocs.info - you stick the symbol at the end, so dpldocs.info/std.string.chomp brings you right there.
 Ew. I like slurp more. I find slurp to be an excellent name, actually.
I'm ok with it too. At first, though, I'd expect it to do what std.file.read does; just slurp it right up into plain memory.
 munch is better than eat, in my opinion. I like munch.
Yea. It needs to be looked up once, but is easily memorable after that. -- Adam D. Ruppe http://arsdnet.net
Feb 20 2010
prev sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Adam D. Ruppe" <destructionator gmail.com> wrote in message 
news:mailman.71.1266679989.4461.digitalmars-d puremagic.com...
  - std.string.chomp, chompPrefix, chop
cutOffEnd, cutOffBeginning, cutOffTrailingNewline blargh, I really prefer chomp to those.
How about just trim? That's pretty typical. trim, trimLeft, trimRight or maybe 'strip'.
Feb 20 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Nick Sabalausky wrote:
 "Adam D. Ruppe" <destructionator gmail.com> wrote in message 
 news:mailman.71.1266679989.4461.digitalmars-d puremagic.com...
  - std.string.chomp, chompPrefix, chop
cutOffEnd, cutOffBeginning, cutOffTrailingNewline blargh, I really prefer chomp to those.
How about just trim? That's pretty typical. trim, trimLeft, trimRight or maybe 'strip'.
strip is already present. Andrei
Feb 20 2010
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sat, Feb 20, 2010 at 10:34:42AM -0500, Adam D. Ruppe wrote:
   Side note: there should be some magic thing that lets you punch in
   a symbol, and immediately go to the docs.
 
   Actually, I'll do it now.
 
   http://arsdnet.net/dcode/find.php
 
   Source at the bottom of this message.
I should have tested the example I gave before sending...
                 $name = strtolower($_GET['symbol']);
The strtolower should be cut out; "indexof" != "indexOf". Duh. So we have
                 $name = $_GET['symbol'];
In its place.
Feb 20 2010
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
KennyTM~ wrote:
 On Feb 20, 10 11:31, Andrei Alexandrescu wrote:
 Justin Johansson wrote:
 Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations.
My understanding is that he included it to clarify that it's an appropriate word, not to explain a rare word such as "nefandous".
 That's tantamount to what you are saying. imho, use of "silly"
 words like this in the language are a retrograde step.
This is the third time I'm asking: what is a list of allegedly silly names in phobos? Far as I can tell the case against "retro" and "iota" is rather tenuous. So what are others? readText? topN? setDifference? Talk to me. Andrei
Major silly names: - std.file.slurp
http://search.cpan.org/~dconway/Perl6-Slurp-0.03/Slurp.pm http://code.google.com/p/python-pipeline/wiki/slurp
  - std.iterator.retro, std.range.retro
Some arond here seem to be very comfortable about it. Anyway, let's find another one (can't be "reverse").
  - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
  - std.range.cons
http://en.wikipedia.org/wiki/Cons
  - std.range.iota
C++, APL, Go: http://bytes.com/topic/c/answers/446688-iota http://en.wikipedia.org/wiki/Iota
  - std.string.chomp, chompPrefix, chop
http://perldoc.perl.org/functions/chomp.html http://www.pageresource.com/cgirec/ptut13.htm http://php.net/manual/en/function.chop.php http://ruby-doc.org/core/classes/String.html#M000819
  - std.string.munch
Inspired from here: http://en.wikipedia.org/wiki/Maximal_munch
  - std.string.sformat
Alternative?
  - std.utf.stride (which is totally different from std.range.stride)
Agreed. Alternative?
 Minor annoyances:
 
  - std.contracts.enforceEx (sounds like Win32 API which you should use 
 in favor of enforce.)
Agreed. Alternative?
  - std.path.rel2abs (why not relToAbs?)
It's shorter and apparently there's no trouble in understanding it.
  - std.range.sameHead (should be sameFront?)
Agreed.
  - std.stream.Stream.readBlock & writeBlock (sounds like blocking vs 
 non-blocking operations, esp. for SocketStream.)
std.stream will be terminated.
  - and many inconsistent naming conventions, e.g.
     * std.string.ljustify vs stripl
     * std.string.countchars (all lower) vs inPattern (CamelCase)
This is Walter's experiment of wheelbarrowing string functions from several languages into std.string. I'd like to fix that. Andrei
Feb 20 2010
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sat, Feb 20, 2010 at 10:41:33AM -0600, Andrei Alexandrescu wrote:
 Some arond here seem to be very comfortable about it. Anyway, let's find 
 another one (can't be "reverse").
inReverse() is the best that comes to my mind. I see a lot of the range functions as adjectives rather than verbs or nouns in the way they work, something that might be useful to keep in mind when naming them. retro() is perfect in that sense, IMO. inReverse is a close synonym.
 It's shorter and apparently there's no trouble in understanding it.
Understanding words is relatively easy; the human brain can make sense out of a lot of gibberish. In this case, the trouble would be when writing it. With a consistent pattern, you always spell words the same way and use the same capitalization, making writing it easy. Same argument order helps here too. rel2abs is easy to read, but if you don't use it often, your first guess would be to follow the same pattern as the rest of the lib, which is more like relToAbs. Not a big deal, but an annoyance. PHP is inconsistent in every way here, and is one of the biggest problems I have with it - not a small statement, considering PHP's wealth of problems! I write str_replace and it works. Next line, I do str_tolower... and it doesn't work. Now I have to look it up in the docs - is it strtolower? str2lower? tolower? toLowerCase? Too many to guess and check. Just a pain in the ass. D avoids it mostly, but should strive to avoid it entirely. rel2abs is a tiny, minor example, but we don't want to let it grow into a bigger mess down the line. Best to change it now while we easily can.
 Andrei
-- Adam D. Ruppe http://arsdnet.net
Feb 20 2010
prev sibling next sibling parent reply KennyTM~ <kennytm gmail.com> writes:
On Feb 21, 10 00:41, Andrei Alexandrescu wrote:
 KennyTM~ wrote:
 Major silly names:

 - std.file.slurp
http://search.cpan.org/~dconway/Perl6-Slurp-0.03/Slurp.pm http://code.google.com/p/python-pipeline/wiki/slurp
It maybe very common in Perl, but a name used by one or two languages/non-standard libraries cannot be a proof that it's a good name or widely used outside that circle. (I prefer "readLines" or "parseLines")
 - std.iterator.retro, std.range.retro
Some arond here seem to be very comfortable about it. Anyway, let's find another one (can't be "reverse").
 - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
The name, it sounds silly, that's it ;) (My alternatives will be very long and you won't use it anyway.)
 - std.range.cons
http://en.wikipedia.org/wiki/Cons
As if I knew Lisp. (See slurp) ("prepend")
 - std.range.iota
C++, APL, Go: http://bytes.com/topic/c/answers/446688-iota http://en.wikipedia.org/wiki/Iota
Shall we rename "cos" to "circle(2, x)"? (See slurp) ("range", or make a..b into a range.)
 - std.string.chomp, chompPrefix, chop
http://perldoc.perl.org/functions/chomp.html http://www.pageresource.com/cgirec/ptut13.htm http://php.net/manual/en/function.chop.php http://ruby-doc.org/core/classes/String.html#M000819
OK.
 - std.string.munch
Inspired from here: http://en.wikipedia.org/wiki/Maximal_munch
"match". Or "parsePattern" as used in std.metastrings. (Or rename them into "munchInteger"?)
 - std.string.sformat
Alternative?
"formatBuffer". What does the "s" mean anyway?
 - std.utf.stride (which is totally different from std.range.stride)
Agreed. Alternative?
"sequenceLength", "codePointLength", or rename std.range.stride to "skip".
 Minor annoyances:

 - std.contracts.enforceEx (sounds like Win32 API which you should use
 in favor of enforce.)
Agreed. Alternative?
"exceptionEnforce", similar to "errnoEnforce".
 - std.path.rel2abs (why not relToAbs?)
It's shorter and apparently there's no trouble in understanding it.
I agree.
 - std.range.sameHead (should be sameFront?)
Agreed.
 - std.stream.Stream.readBlock & writeBlock (sounds like blocking vs
 non-blocking operations, esp. for SocketStream.)
std.stream will be terminated.
OK.
 - and many inconsistent naming conventions, e.g.
 * std.string.ljustify vs stripl
 * std.string.countchars (all lower) vs inPattern (CamelCase)
This is Walter's experiment of wheelbarrowing string functions from several languages into std.string. I'd like to fix that.
Nice to know that.
 Andrei
Feb 20 2010
next sibling parent "Nick Sabalausky" <a a.a> writes:
"KennyTM~" <kennytm gmail.com> wrote in message 
news:hlpe64$1uvn$1 digitalmars.com...
 On Feb 21, 10 00:41, Andrei Alexandrescu wrote:
 KennyTM~ wrote:
 - std.utf.stride (which is totally different from std.range.stride)
Agreed. Alternative?
"sequenceLength", "codePointLength", or rename std.range.stride to "skip".
"Code Point" and "Code Unit" are standard Unicode terminology. I would find it good for them to be used where appropriate.
Feb 20 2010
prev sibling parent reply "Nick Sabalausky" <a a.a> writes:
"KennyTM~" <kennytm gmail.com> wrote in message 
news:hlpe64$1uvn$1 digitalmars.com...
 On Feb 21, 10 00:41, Andrei Alexandrescu wrote:
 KennyTM~ wrote:
 - std.string.sformat
Alternative?
"formatBuffer". What does the "s" mean anyway?
"string". I assume the name "sformat" was modeled after the "sprintf" variant of "printf".
Feb 20 2010
parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-02-20 20:32:03 -0500, "Nick Sabalausky" <a a.a> said:

 "KennyTM~" <kennytm gmail.com> wrote in message
 news:hlpe64$1uvn$1 digitalmars.com...
 On Feb 21, 10 00:41, Andrei Alexandrescu wrote:
 KennyTM~ wrote:
 
 - std.string.sformat
Alternative?
"formatBuffer". What does the "s" mean anyway?
"string". I assume the name "sformat" was modeled after the "sprintf" variant of "printf".
I'd say go with just "format". That'd make the fully qualified name is "std.string.format", no need to repeat "string" a second time, even if it's just an "s". -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Feb 20 2010
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sat, Feb 20, 2010 at 09:11:32PM -0500, Michel Fortin wrote:
 I'd say go with just "format". That'd make the fully qualified name is 
 "std.string.format", no need to repeat "string" a second time, even if 
 it's just an "s".
There's already a format() function - it returns a dynamically allocated string for the result. The difference with sformat() is it takes a buffer in, instead of allocating its own. The only use for sformat that I can think of over regular format() is to boost performance in certain special cases; it wouldn't be used regularly. -- Adam D. Ruppe http://arsdnet.net
Feb 20 2010
parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-02-20 23:21:01 -0500, "Adam D. Ruppe" <destructionator gmail.com> said:

 On Sat, Feb 20, 2010 at 09:11:32PM -0500, Michel Fortin wrote:
 I'd say go with just "format". That'd make the fully qualified name is
 "std.string.format", no need to repeat "string" a second time, even if
 it's just an "s".
There's already a format() function - it returns a dynamically allocated string for the result. The difference with sformat() is it takes a buffer in, instead of allocating its own. The only use for sformat that I can think of over regular format() is to boost performance in certain special cases; it wouldn't be used regularly.
Ah, I see. Normally, that'd be a great case for overloading, but format being variadic and accepting any argument type makes this impractical. I'd say "formatInBuffer" looks like a viable alternative. It's clear, it's also longer but assuming its use is sparse a descriptive name might be beneficial. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Feb 21 2010
parent Mike James <foo bar.com> writes:
Michel Fortin Wrote:

 On 2010-02-20 23:21:01 -0500, "Adam D. Ruppe" <destructionator gmail.com> said:
 
 On Sat, Feb 20, 2010 at 09:11:32PM -0500, Michel Fortin wrote:
 I'd say go with just "format". That'd make the fully qualified name is
 "std.string.format", no need to repeat "string" a second time, even if
 it's just an "s".
There's already a format() function - it returns a dynamically allocated string for the result. The difference with sformat() is it takes a buffer in, instead of allocating its own. The only use for sformat that I can think of over regular format() is to boost performance in certain special cases; it wouldn't be used regularly.
Ah, I see. Normally, that'd be a great case for overloading, but format being variadic and accepting any argument type makes this impractical. I'd say "formatInBuffer" looks like a viable alternative. It's clear, it's also longer but assuming its use is sparse a descriptive name might be beneficial. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Your thinking in Pascal - stop it at once ;-) -=mike=-
Feb 21 2010
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message 
news:hlp3bv$1als$1 digitalmars.com...
 KennyTM~ wrote:
 Major silly names:

  - std.iterator.retro, std.range.retro
Some arond here seem to be very comfortable about it. Anyway, let's find another one (can't be "reverse").
"reverseOf"?
  - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
I like it, but I can definitely understand that some people might find its meaning too indirect. Maybe "std.random.discrete" or "std.random.even" or "std.random.regular" or somethingliek that?
  - std.range.iota
C++, APL, Go: http://bytes.com/topic/c/answers/446688-iota http://en.wikipedia.org/wiki/Iota
Could it be an overload of "sequence"? It looks to me like it's just a special case of sequence.
 Minor annoyances:

  - std.contracts.enforceEx (sounds like Win32 API which you should use in 
 favor of enforce.)
Agreed. Alternative?
"enforceException"?
  - std.path.rel2abs (why not relToAbs?)
It's shorter and apparently there's no trouble in understanding it.
It's cute. But that's probably more of a downside. I agree with the other person who said "To" would be much more consistent.
Feb 20 2010
parent reply Justin Johansson <no spam.com> writes:
Nick Sabalausky wrote:
 
  - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
I like it, but I can definitely understand that some people might find its meaning too indirect. Maybe "std.random.discrete" or "std.random.even" or "std.random.regular" or somethingliek that?
If cuteness in a word is at all a relevant factor in deciding upon a name how about std.random.dip Justin's etymology of "dip": 1. Derived from "lucky dip", meaning to draw an item (often a prize) randomly from a container (often a barrel at a fair or carnival). 2. Derived by contraction of serendipity or serendipitous. The idea of generating a "serendipitous number" as opposed to generating (just a) PORN (Plain Old Random Number) by all measures has got to be cute. Just so happens, serendipitous in fact, that "serendipitous" is one of my favorite words. It's also a pure fluke that the acronym for Plain Old Random Number turns out be what it is .. I was thinking of Plain Old Java Object POJO when that came to mind. :-) See also (the first link is quite an interesting read) http://serendipity.ruwenzori.net/index.php/2006/12/03/seredipitous-etymology http://www.etymonline.com/index.php?search=Serendipity Cheers Justin Johansson
Feb 20 2010
parent reply KennyTM~ <kennytm gmail.com> writes:
On Feb 21, 10 10:04, Justin Johansson wrote:
 Nick Sabalausky wrote:
 - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
I like it, but I can definitely understand that some people might find its meaning too indirect. Maybe "std.random.discrete" or "std.random.even" or "std.random.regular" or somethingliek that?
If cuteness in a word is at all a relevant factor in deciding upon a name how about std.random.dip Justin's etymology of "dip": 1. Derived from "lucky dip", meaning to draw an item (often a prize) randomly from a container (often a barrel at a fair or carnival). 2. Derived by contraction of serendipity or serendipitous. The idea of generating a "serendipitous number" as opposed to generating (just a) PORN (Plain Old Random Number) by all measures has got to be cute. Just so happens, serendipitous in fact, that "serendipitous" is one of my favorite words. It's also a pure fluke that the acronym for Plain Old Random Number turns out be what it is .. I was thinking of Plain Old Java Object POJO when that came to mind. :-) See also (the first link is quite an interesting read) http://serendipity.ruwenzori.net/index.php/2006/12/03/seredipitous-etymology http://www.etymonline.com/index.php?search=Serendipity Cheers Justin Johansson
I think any function names that needs to tell user a story or dictionary definition before knowing why it is chosen is a bad name.
Feb 20 2010
parent Justin Johansson <no spam.com> writes:
KennyTM~ wrote:
 On Feb 21, 10 10:04, Justin Johansson wrote:
 Nick Sabalausky wrote:
 - std.random.dice (it is a discrete distribution...)
What's wrong with dice?
I like it, but I can definitely understand that some people might find its meaning too indirect. Maybe "std.random.discrete" or "std.random.even" or "std.random.regular" or somethingliek that?
If cuteness in a word is at all a relevant factor in deciding upon a name how about std.random.dip Justin's etymology of "dip": 1. Derived from "lucky dip", meaning to draw an item (often a prize) randomly from a container (often a barrel at a fair or carnival). 2. Derived by contraction of serendipity or serendipitous. The idea of generating a "serendipitous number" as opposed to generating (just a) PORN (Plain Old Random Number) by all measures has got to be cute. Just so happens, serendipitous in fact, that "serendipitous" is one of my favorite words. It's also a pure fluke that the acronym for Plain Old Random Number turns out be what it is .. I was thinking of Plain Old Java Object POJO when that came to mind. :-) See also (the first link is quite an interesting read) http://serendipity.ruwenzori.net/index.php/2006/12/03/seredipitous-etymology http://www.etymonline.com/index.php?search=Serendipity Cheers Justin Johansson
I think any function names that needs to tell user a story or dictionary definition before knowing why it is chosen is a bad name.
Sorry; I didn't mean this "suggestion" to be taken too seriously; just a little (possibly lame) humour and an ultra-subtle parody on choosing library names based upon their cuteness factor or how much they "rock". I couldn't agree more that the meaning of function names should be self-evident (at least to a reasonable degreee) without having to consult a dictionary. For me, Norbert Nemec pretty much sums it up in his spin-off thread "Design of intuitive interfaces".
Feb 20 2010
prev sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Andrei Alexandrescu wrote:
 KennyTM~ wrote:
  - std.range.iota
=20 C++, APL, Go: =20
Actually, APL doesn't use "iota" but "=CE=B9" which translates as "i". So since we don't want to introduce impossible-to-type characters in D, we should rename std.range.iota to std.range.i ;) Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 21 2010
prev sibling parent Justin Johansson <no spam.com> writes:
Andrei Alexandrescu wrote:
 This is the third time I'm asking: what is a list of allegedly silly 
 names in phobos? Far as I can tell the case against "retro" and "iota" 
 is rather tenuous. So what are others? readText? topN? setDifference? 
 Talk to me.
Well, there you go. You have teased it out. Aside from retro and itoa, KennyTM has come up with a list for your due consideration. Congrats Kenny for the list and congrats Andrei for persisting the question for a third time. Sorry I wasn't more helpful. -- Justin
Feb 20 2010
prev sibling parent reply Yigal Chripun <yigal100 gmail.com> writes:
On 20/02/2010 05:03, Justin Johansson wrote:
 Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations. That's tantamount to what you are saying. imho, use of "silly" words like this in the language are a retrograde step. Cheers Justin Johansson
Hum, didn't you mean a link to a *Latin* dictionary? ;)
Feb 20 2010
parent reply Justin Johansson <no spam.com> writes:
Yigal Chripun wrote:
 On 20/02/2010 05:03, Justin Johansson wrote:
 Nick Sabalausky wrote:
 "dave eveloper" <tango land.net> wrote in message
 news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was
 designed by larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch? Because of silly symbol names like 'retro' I think there's more reason for someone to not like Phobos. Bearophile also always reminds us that a proper closure inlining support would make collection algorithms as fast as the ugly string template hack Phobos. That way you wouldn't have hard coded parameter symbols like a and b.
Dictionary.com Unabridged, Based on the Random House Dictionary: retro- a prefix occurring in loanwords from Latin meaning “backward” (retrogress); on this model, used in the formation of compound words (retrorocket). So can we stop this "retro is a bad name" nonsense now?
Sure, just include a copy of, or link to, an English dictionary alongside D documentation, together with appropriate annotations. That's tantamount to what you are saying. imho, use of "silly" words like this in the language are a retrograde step. Cheers Justin Johansson
Hum, didn't you mean a link to a *Latin* dictionary? ;)
You are quite correct to pull me up on that one. I guess to be more specific I should have said a post-classical Latin dictionary in which occurrence of said "retro" is more common. btw. (and you gotta blow your trumpet sometimes) I won First Prize for Latin at secondary college :-)
Feb 20 2010
parent reply =?windows-1252?Q?=22J=E9r=F4me_M=2E_Berger=22?= <jeberger free.fr> writes:
Justin Johansson wrote:
 Yigal Chripun wrote:
 Hum, didn't you mean a link to a *Latin* dictionary? ;)
=20 You are quite correct to pull me up on that one. I guess to be more specific I should have said a post-classical Latin dictionary in which occurrence of said "retro" is more common. =20 btw. (and you gotta blow your trumpet sometimes) I won First Prize for Latin at secondary college :-) =20
Hum, except that both "retro" and "iota" are actually Greek, not Latin... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 20 2010
parent reply Justin Johansson <no spam.com> writes:
JĂŠrĂ´me M. Berger wrote:
 Justin Johansson wrote:
 Yigal Chripun wrote:
 Hum, didn't you mean a link to a *Latin* dictionary? ;)
You are quite correct to pull me up on that one. I guess to be more specific I should have said a post-classical Latin dictionary in which occurrence of said "retro" is more common. btw. (and you gotta blow your trumpet sometimes) I won First Prize for Latin at secondary college :-)
Hum, except that both "retro" and "iota" are actually Greek, not Latin... Jerome
I don't give an iota about iota. In my dictionary retro is a Latin prefix. However in post-classical Latin it is not uncommon to come across words that have a Greek origin. Me thinks we are both right on this occasion; retro is a Latin prefix; it's in a Latin dictionary and its etymology appears to have a Greek connection. retro- pref. repr. L. retrō- adv. (‘behind’) used in combination as in retrospicere (cf. RETROSPECT), retrogradus (see next), f. RE- + compar. suffix as in intrō- INTRO-; in anat. and path. denoting ‘situated behind’ the part of the body indicated by the second el., as retro-ocular, -uterine. T. F. HOAD. "retro-." The Concise Oxford Dictionary of English Etymology. 1996. Encyclopedia.com. (February 20, 2010). http://www.encyclopedia.com/doc/1O27-retro.html http://www.etymonline.com/index.php?term=retro- http://ewonago.wordpress.com/what-is-the-relation-between-latin-and-greek/ http://ewonago.blogspot.com/2009/12/etymology-of-retro.html
Feb 20 2010
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Justin Johansson wrote:
 JĂŠrĂ´me M. Berger wrote:
 Justin Johansson wrote:
 Yigal Chripun wrote:
 Hum, didn't you mean a link to a *Latin* dictionary? ;)
You are quite correct to pull me up on that one. I guess to be more specific I should have said a post-classical Latin dictionary in which occurrence of said "retro" is more common. btw. (and you gotta blow your trumpet sometimes) I won First Prize for Latin at secondary college :-)
Hum, except that both "retro" and "iota" are actually Greek, not Latin... Jerome
I don't give an iota about iota. In my dictionary retro is a Latin prefix. However in post-classical Latin it is not uncommon to come across words that have a Greek origin. Me thinks we are both right on this occasion; retro is a Latin prefix; it's in a Latin dictionary and its etymology appears to have a Greek connection. retro- pref. repr. L. retrō- adv. (‘behind’) used in combination as in retrospicere (cf. RETROSPECT), retrogradus (see next), f. RE- + compar. suffix as in intrō- INTRO-; in anat. and path. denoting ‘situated behind’ the part of the body indicated by the second el., as retro-ocular, -uterine. T. F. HOAD. "retro-." The Concise Oxford Dictionary of English Etymology. 1996. Encyclopedia.com. (February 20, 2010). http://www.encyclopedia.com/doc/1O27-retro.html http://www.etymonline.com/index.php?term=retro- http://ewonago.wordpress.com/what-is-the-relation-between-latin-and-greek/ http://ewonago.blogspot.com/2009/12/etymology-of-retro.html
retro and iota rock. Andrei
Feb 20 2010
parent Justin Johansson <no spam.com> writes:
Andrei Alexandrescu wrote:
 retro and iota rock.
This discussion has been a lot of fun and certainly there is no need for anyone to feel agitated (referring to rising temperature earlier on in this discussion). My life does not depend on whether or not retro is in or out and nor does the choice of any particular word prevent me from getting work done. While I disagree that retro == reverse order, I'm happy to admit that as far as words sound retro is kind of "cute". Earlier though I argued that retro in the context of its proposed use is, to me , more about going back to a prior epoch on time which is distinct from doing things in reverse order. Given it's high "cuticity index" (to coin a term) it would be a pity, if some future version of D supporting Software Transactional Memory (STM)*** could not make use of retro as it was already taken for much lesser deserving purposes. *** http://en.wikipedia.org/wiki/Software_transactional_memory <sidebar> Snippet from that link: In 2005, Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy described an STM system built on Concurrent Haskell that enables arbitrary atomic operations to be composed into larger atomic operations, a useful concept impossible with lock-based programming. </sidebar> Now I know that is a tenuous argument to reserve a word for some pie-in-the-sky future language feature but imagine how cool this sounds: Dec 2012. News flash. Digital Mars is pleased to announce release 3 of the D programming language featuring Software Transactional Memory ... ... the retro() function makes all changes to the transacted memory region rollback to the state of the memory that existed prior to the beginning of the transaction. Now something like that would really rock! Heh, all of this is probably a useless ramble and can see myself getting way out of depth real soon. With kind regards to all, Justin
Feb 20 2010
prev sibling parent reply =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Justin Johansson wrote:
 I don't give an iota about iota.  In my dictionary retro is a
 Latin prefix.  However in post-classical Latin it is not uncommon
 to come across words that have a Greek origin.  Me thinks we are
 both right on this occasion; retro is a Latin prefix; it's in a
 Latin dictionary and its etymology appears to have a Greek connection.
=20
 retro- pref. repr. L. retr=C5=8D- adv. (=E2=80=98behind=E2=80=99) used =
in combination as in
 retrospicere (cf. RETROSPECT), retrogradus (see next), f. RE- + compar.=
 suffix as in intr=C5=8D- INTRO-; in anat. and path. denoting =E2=80=98s=
ituated
 behind=E2=80=99 the part of the body indicated by the second el., as
 retro-ocular, -uterine.
=20
 T. F. HOAD. "retro-." The Concise Oxford Dictionary of English
 Etymology. 1996. Encyclopedia.com. (February 20, 2010).
 http://www.encyclopedia.com/doc/1O27-retro.html
=20
Well my source for "retro" was this (in French): http://www.le-dictionnaire.com/definition.php?mot=3Dretro which definitely states it has a Greek origin. However, you are right that Latin did borrow a lot of Greek words so it could have come to us through Latin. For "iota" my source was the 1980 edition of the "petit Larousse en couleurs" dictionary. I don't think that one went through Latin though... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 21 2010
parent Justin Johansson <no spam.com> writes:
JĂŠrĂ´me M. Berger wrote:
 Justin Johansson wrote:
 I don't give an iota about iota.  In my dictionary retro is a
 Latin prefix.  However in post-classical Latin it is not uncommon
 to come across words that have a Greek origin.  Me thinks we are
 both right on this occasion; retro is a Latin prefix; it's in a
 Latin dictionary and its etymology appears to have a Greek connection.

 retro- pref. repr. L. retrō- adv. (‘behind’) used in combination as in
 retrospicere (cf. RETROSPECT), retrogradus (see next), f. RE- + compar.
 suffix as in intrō- INTRO-; in anat. and path. denoting ‘situated
 behind’ the part of the body indicated by the second el., as
 retro-ocular, -uterine.

 T. F. HOAD. "retro-." The Concise Oxford Dictionary of English
 Etymology. 1996. Encyclopedia.com. (February 20, 2010).
 http://www.encyclopedia.com/doc/1O27-retro.html
Well my source for "retro" was this (in French): http://www.le-dictionnaire.com/definition.php?mot=retro which definitely states it has a Greek origin. However, you are right that Latin did borrow a lot of Greek words so it could have come to us through Latin. For "iota" my source was the 1980 edition of the "petit Larousse en couleurs" dictionary. I don't think that one went through Latin though... Jerome
Jerome, I think you are correct. I o'ta know that. :-) (I ought to know that.) Cheers Justin
Feb 21 2010
prev sibling parent "Nick Sabalausky" <a a.a> writes:
"dave eveloper" <tango land.net> wrote in message 
news:hlm402$1mr0$1 digitalmars.com...
 Ezneh Wrote:

 So, it is not better to find a compromise between these libraries ?
 Why they have to be "two" libraries rather than one which was designed by 
 larsivi, Walter Bright and Andrei Alexandrescu ?
I haven't seen larsivi around lately. Is it possible that there's a communication problem? Perhaps a personality mismatch?
He mainly hangs around the Tango forums.
 Bearophile also always reminds us that a proper closure inlining support 
 would make collection algorithms as fast as the ugly string template hack 
 Phobos. That way you wouldn't have hard coded parameter symbols like a and 
 b.
I like having the option of pre-defined param symbols for closures. If a closure is trivial enough, then manually defining a custom-name can be overkill (but with D2's additional syntax suger for anon closures, it's not that big of a deal). The problem I do have with it though, is that they're evaluated in the wrong scope.
Feb 19 2010
prev sibling next sibling parent Nick B <"nick_NOSPAM_.barbalich" gmail.com> writes:
Paul D. Anderson wrote:
 Putting even more carts before their horses ---
 
 Will Tango move from D1 to D2 when D2 is "frozen"?
 
 More accurately, I guess, when Walter declares D2 stable and starts on D3?
That is that plan that has/is been discussed by the tango community. Nick B
Feb 18 2010
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Paul D. Anderson wrote:
 Putting even more carts before their horses ---
 
 Will Tango move from D1 to D2 when D2 is "frozen"?
 
 More accurately, I guess, when Walter declares D2 stable and starts on D3?
Hopefully Walter will first finish D1, then finish D2, then start on D3. But what's the likelihood that he'll do the latter two in that order? Stewart.
Feb 18 2010
parent Norbert Nemec <Norbert Nemec-online.de> writes:
Stewart Gordon wrote:
 Paul D. Anderson wrote:
 Putting even more carts before their horses ---

 Will Tango move from D1 to D2 when D2 is "frozen"?

 More accurately, I guess, when Walter declares D2 stable and starts on 
 D3?
Hopefully Walter will first finish D1, then finish D2, then start on D3. But what's the likelihood that he'll do the latter two in that order?
Maybe, Walter should make more use of the nice language feature "delegate"? :-)
Feb 20 2010