string is rarely useful as a function argument

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Dec 28 22:09:16 PST 2011


On 12/29/11 12:01 AM, Adam D. Ruppe wrote:
> On Thursday, 29 December 2011 at 05:37:00 UTC, Walter Bright wrote:
>> I've seen the damage done in C++ with multiple string types. Being
>> able to convert from one to the other doesn't help much.
>
> Note that I'm on your side here re strings, but you're
> underselling the D language too! These conversions
> are implicit both ways, and completely free. D structs
> can wrap other D types perfectly well.

Nah, that still breaks a lotta code because people parameterize on T[], 
use isSomeString/isSomeChar etc.

Nagonna.


Andrei



More information about the Digitalmars-d mailing list