On 02/24/2011 07:08 PM, Ali Çehreli wrote:
Implicit conversions to immutable in the following two functions feel harmless.
Has this been discussed before?
string foo()
{
char[] s;
return s; // Error: cannot implicitly convert expression
// (s) of type char[] to string
}
string bar()
{
char[] s;
On 02/24/2011 10:28 AM, spir wrote:
> On 02/24/2011 07:08 PM, Ali Çehreli wrote:
>> Implicit conversions to immutable in the following two functions feel
>> harmless.
>> Has this been discussed before?
>>
>> string foo()
>> {
>> char[] s;
>> return s; // Error: cannot implicitly convert expression
On 24.02.2011 19:08, Ali Çehreli wrote:
Implicit conversions to immutable in the following two functions feel
harmless. Has this been discussed before?
string foo()
{
char[] s;
return s; // Error: cannot implicitly convert expression
// (s) of type char[] to string
}
string bar()
{
char[] s;
re
Ali Ãehreli Wrote:
> I have another question: Does calling .idup copy any data below?
>
> string foo()
> {
> char[] s;
> return s.idup; // Is the content copied?
> }
>
> Ali
>
Yes, dup stands for duplicate and is a property of arrays.
There was discussion for allowing immutable ob
Also there is std.exception.assumUnique()
Ali Çehreli napisał:
> Implicit conversions to immutable in the following two functions feel
> harmless. Has this been discussed before?
>
> string foo()
> {
> char[] s;
> return s; // Error: cannot implicitly convert expression
>//(s) of type char[] to