string is rarely useful as a function argument

Timon Gehr timon.gehr at gmx.ch
Thu Dec 29 09:36:29 PST 2011


On 12/29/2011 07:53 AM, Walter Bright wrote:
> On 12/28/2011 10:08 PM, Andrei Alexandrescu wrote:
>> The only solution is to explain Walter no other programmer in the
>> world codes
>> UTF like him. Really. I emulate that sometimes (learned from him) but
>> I see code
>> from hundreds of people day in and day out - it's never like his.
>>
>> Once we convince him, he'll be like "ah, I see what you mean.
>> Requiring .rep is
>> awesome. Let's do it."
>
> If that ever happens, I owe you a beer. Maybe two!
>
> Maybe it's hubris, but I think D nails what a string type should be. I'm
> extremely reluctant to mess with its success. It strikes the right
> balance between aesthetics, efficiency and utility.
>

I fully agree. If I had to design an imperative programming language, 
this is how its strings would work.

> C++11 and C11 appear to have copied it.


More information about the Digitalmars-d mailing list