char[][] to std::vector<std::string> - DIP or dmd-issue?
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 13 09:09:55 PDT 2015
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote:
> Huh? You mean with string literals? That would be a rather
> silly reason to avoid `char[]`. Please show an example of .dup
> you'd like to avoid.
Yes, string literals.
>> I understand that the type of `string[]` to D is a simple data
>> type than `char[][]`,
>
> Are you saying that `string[]` is simpler than `char[][]`?
> That's not true: `string` is an alias for `immutable(char)[]`,
> so `string[]` is the same as `immutable(char)[][]`.
On Monday, 18 May 2015 at 13:14:38 UTC, Steven Schveighoffer
wrote:
> But really, a string is immutable. There's not a way around
> that. A string is the most basic level of array primitive, not
> even mutable arrays of non-char types have that, and it's an
> annoyance. From there, you have to build the data out of ROM
> into the heap.
http://forum.dlang.org/post/mjctql$j19$1@digitalmars.com
More information about the Digitalmars-d-learn
mailing list