The more interesting question
Gor Gyolchanyan
gor.f.gyolchanyan at gmail.com
Mon May 14 11:28:03 PDT 2012
If printf is used instead of writeln, then there's something seriously
wrong with druntime in the first place. This is just ridiculous.
On Mon, May 14, 2012 at 9:38 PM, Alex Rønne Petersen <xtzgzorex at gmail.com>wrote:
> On 14-05-2012 15:21, Gor Gyolchanyan wrote:
>
>> I thing the zero-terminated literal shtick is pointless. Literals are
>> rarely passed to C functions, so we gotta use the std.utf.toUTFz anyway.
>>
>> On Mon, May 14, 2012 at 5:03 PM, Christophe
>> <travert at phare.normalesup.org <mailto:travert at phare.**normalesup.org<travert at phare.normalesup.org>>>
>> wrote:
>>
>> deadalnix , dans le message (digitalmars.D:167258), a écrit :
>> > A good solution would be to set the pointer to 0 when the length
>> is set
>> > to 0.
>>
>> String literal are zero-terminated. "" cannot point to 0x0,
>> unless we drop this rule. Maybe we should...
>>
>>
>>
>>
>> --
>> Bye,
>> Gor Gyolchanyan.
>>
>
> This is very false. I invite you to read almost any module in druntime.
> You'll find that it makes heavy use of printf debugging.
>
> That being said, dropping the null-termination rule when passing strings
> to non-const(char)* parameters/variables/etc would be sane enough (I think).
>
> --
> - Alex
>
--
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120514/1c41e2ed/attachment.html>
More information about the Digitalmars-d
mailing list