July 02, 2012 Re: Is this statement in http://dlang.org/dmd-windows.html still true? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pierre Rouleau | On 07/01/2012 06:42 PM, Pierre Rouleau wrote: > Would the following rewrite of the above statement maintain the original > intent while conveying a little bit more information? > > "It is never a good idea to write into a string literal. "never a good idea" would be too permissive and welcoming. The documentation should simply say that writing into a string literal is undefined behavior (exactly like in other popular system languages like C and C++). The current documentation gets into unnecessary detail of what may happen and why under different environments. Well, yes. :) It is undefined behavior. Ali |
July 02, 2012 Re: Is this statement in http://dlang.org/dmd-windows.html still true? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | On 12-07-02 4:58 AM, Ali Çehreli wrote:
> On 07/01/2012 06:42 PM, Pierre Rouleau wrote:
>
> > Would the following rewrite of the above statement maintain the original
> > intent while conveying a little bit more information?
> >
> > "It is never a good idea to write into a string literal.
>
> "never a good idea" would be too permissive and welcoming. The
> documentation should simply say that writing into a string literal is
> undefined behavior (exactly like in other popular system languages like
> C and C++).
>
> The current documentation gets into unnecessary detail of what may
> happen and why under different environments. Well, yes. :) It is
> undefined behavior.
>
> Ali
>
Thanks Ali, I completely agree.
-
Pierre Rouleau
|
Copyright © 1999-2021 by the D Language Foundation