On 10 January 2014 04:00, Adam D. Ruppe <destructiona...@gmail.com> wrote:
> On Thursday, 9 January 2014 at 17:54:05 UTC, Dicebot wrote: > >> It is not the same thing as sample with byGrapheme though. >> > > Right, but it works for ascii (and others) and shows std.string isn't as > weak as being said in this thread. > So is it 'correct'? The docs don't really say what it does. Is 'index' in bytes, in codepoints, or in graphemes? Looks like bytes, but then it talks about std.utf.UTFException, so maybe codepoints? Being correct is constantly being thrown around as the 'value' in why everything's so fucking hard... if this function isn't 'correct', then we have a disparity. I also don't think it excuses any of my other points. There shouldn't be 4-5+ modules where you have to look whenever you want to find string related stuff. In this case, my explicit example is just the straw that broke the camels back. My experience still stands; every time I try to do any serious string work, I waste far more time than I care to, and I HATE doing it. Makes me feel dirty and I don't enjoy my programming time (which I ususally do enjoy). In my experience, if you're not enjoying programming, something went wrong. The D docs are pretty terrible, they don't do much to help you find what you're looking for. You have a massive block of function names at the top of the page, you have to carefully scan through one by one, hoping that it's named something obvious that will stand out to you, and in the event it doesn't have a helper function, you need to work out the proper sequence of algorithm/range/whatever operations to do what you want (and then repeat the process finding the small parts you need across a bunch of modules). Blah! </endrant>