On 10/06/2010 01:41, Andrei Alexandrescu wrote:
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
tailconst strikes back? :]
--
Bruno Medeiros - Software Engineer
On Wed, 09 Jun 2010 20:41:48 -0400, Andrei Alexandrescu
wrote:
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
I think this works well.
Same goes for const and shared.
-Steve
Andrei Alexandrescu wrote:
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
This absolutely seems sensiblest. Vote++;
--
Simen
Andrei Alexandrescu wrote:
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
This absolutely seems sensiblest. Vote++;
--
Simen
Hello Andrei,
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
What say you?
b.vote++
Making that an implicit conversion on any copy should be safe. But would
it have any side effects?
Also, w
On 2010-06-09 20:41:48 -0400, Andrei Alexandrescu
said:
(b) Promote a change in the compiler to convert immutable(T[]) to
immutable(T)[] when passed by value into a function. This is safe and
sensible.
This looks good to me.
Although I wonder what happens if that range is a class, will you
I'm thinking of the recently discussed problem and it seems that
immutable arrays are an issue not only for find(), but for all functions
that need ranges.
To fix things I'd need to add code for detecting immutable(T[]) and
converting it to immutable(T)[] for _every_ algorithm using ranges out