Should this work?

Manu turkeyman at gmail.com
Thu Jan 9 16:56:27 PST 2014


On 10 January 2014 04:00, Adam D. Ruppe <destructionator at 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140110/fa5c7b35/attachment-0001.html>


More information about the Digitalmars-d mailing list