The more interesting question

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Tue May 15 03:06:35 PDT 2012


I agree completely. The only way D can steal the market of programming
languages is to be fast moving. Part of being fast-moving is being able to
quickly fix any problems, that are detected, instead of building an
infrastructure around those problems.

On Tue, May 15, 2012 at 12:39 PM, deadalnix <deadalnix at gmail.com> wrote:

> Le 14/05/2012 19:38, Alex Rønne Petersen a écrit :
>
>  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).
>>
>>
> This looks to me like a bad practice. C string and D string are different
> beasts, and we have toStringz .
>
> It is kind of dumb to create a WAT is the language because druntime dev
> did mistakes. It have to be fixed.
>



-- 
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120515/8ac92a43/attachment.html>


More information about the Digitalmars-d mailing list