Should this work?
Jacob Carlborg
doob at me.com
Thu Jan 9 23:53:20 PST 2014
On 2014-01-10 06:48, Andrei Alexandrescu wrote:
> On 1/9/14 8:21 AM, Manu wrote:
>> My standing opinion is that string manipulation in D is not nice, it is
>> possibly the most difficult and time consuming I have used in any
>> language ever. Am I alone?
>
> No, but probably in the minority.
>
> The long and short of it is, you must get ranges in order to enjoy the
> power of D algorithms (as per http://goo.gl/dVprVT).
>
> std.{algorithm,range} are commonly mentioned as an attractive asset of
> D, and those who get that style of doing things have no trouble applying
> such notions to a variety of data, notably including strings. So going
> with the attitude "I don't use, know, or care for phobos... I just want
> to do this pesky string thing!" is bound to create frustration.
Even if you do get how ranges work it can be difficult to figure out
where a function is located, in std.algorithms, std.string, std.array,
std.uni or std.range. Like, "is this a string operation or a general
container algorithm?". Why is there a std.string.indexOf function? Isn't
that a general array operation or algorithm? Isn't
std.string.(left|right)Justify a general operation as well?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list