[OT] What is more readable?

2010-08-09 Thread simendsjo
Continuing "my what is more readable" thread (just shut me up, but I don't always agree with i, j, k etc...): std.string.count: size_t count(string s, string sub) { size_t i; int j; int count = 0; for (i = 0; i < s.length; i += j + sub.length) { j = indexOf(s[i .. s

Re: [OT] What is more readable?

2010-08-09 Thread Jonathan M Davis
On Monday, August 09, 2010 17:20:07 simendsjo wrote: > Continuing "my what is more readable" thread (just shut me up, but I > don't always agree with i, j, k etc...): Personally, I think that i is just fine in many cases where it's quite clear what you're doing. e.g. the standard for loop: for(

Re: [OT] What is more readable?

2010-08-09 Thread simendsjo
On 10.08.2010 02:40, Jonathan M Davis wrote: On Monday, August 09, 2010 17:20:07 simendsjo wrote: Continuing "my what is more readable" thread (just shut me up, but I don't always agree with i, j, k etc...): Personally, I think that i is just fine in many cases where it's quite clear what you

Re: [OT] What is more readable?

2010-08-09 Thread simendsjo
On 10.08.2010 02:53, simendsjo wrote: On 10.08.2010 02:40, Jonathan M Davis wrote: On Monday, August 09, 2010 17:20:07 simendsjo wrote: Continuing "my what is more readable" thread (just shut me up, but I don't always agree with i, j, k etc...): Personally, I think that i is just fine in many

Re: [OT] What is more readable?

2010-08-10 Thread bearophile
simendsjo: > And on the other hand; I doubt anything of what I write will ever get > into phobos! If you exercise writing D code for few months you will be able contribute to Phobos2. Bye, bearophile