On Thu, 22 Sep 2011 22:18:29 +0100, Jonathan M Davis
wrote:
On Thursday, September 22, 2011 14:10 Steven Schveighoffer wrote:
No, the parameter types can be const, and can accept mutable arguments.
The main point is, the return value has to be proven to be *unique*. The
only way to do this wit
"Jesse Phillips" wrote in message
news:[email protected]...
> Thank you this lets it compile. I think I had that somewhere, but forgot
> about it. As Steve mentions, it probably should also work for const
> arguments too.
It probably will, eventually. Some expressions can be pr
Jesse Phillips:
> Thank you this lets it compile. I think I had that somewhere, but forgot
> about it. As Steve mentions, it probably should also work for const arguments
> too.
If you are convinced of this, then I suggest you to add an enhancement request
in Phobos about it. It will make puri
Dmitry Olshansky Wrote:
> Maybe:
> -<<
> List!T makeFromArray(T)(immutable T[] array) pure {
> --
> Dmitry Olshansky
Thank you this lets it compile. I think I had that somewhere, but forgot about
it. As Steve mentions, it probably should also work for const ar
On Thursday, September 22, 2011 14:10 Steven Schveighoffer wrote:
> On Thu, 22 Sep 2011 17:03:08 -0400, Jonathan M Davis
>
> wrote:
> > In any case, in order for a function to be able to have its return value
> > implicitly value implicitly cast to immutable, it must pure and all of
> > its
> > a
On Thursday, September 22, 2011 14:03 Jonathan M Davis wrote:
> In any case, in order for a function to be able to have its return value
> implicitly value implicitly cast to immutable, it must pure and all of its
> arguments must be immutable[...]
Ouch! I really must reread my posts more before p
On Thu, 22 Sep 2011 17:03:08 -0400, Jonathan M Davis
wrote:
In any case, in order for a function to be able to have its return value
implicitly value implicitly cast to immutable, it must pure and all of
its
arguments must be immutable or implicitly convertible to immutable (or -
if
the
Jesse Phillips wrote:
> The discussion on Reddit brought to my attention that pure functions can
> return and assign to an immutable.
>
>
http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/c2lsgek
>
> I am trying to modify the example request to make use of this, b
On Thursday, September 22, 2011 13:25 Steven Schveighoffer wrote:
> On Thu, 22 Sep 2011 16:15:20 -0400, Jonathan M Davis
>
> wrote:
> > On Thursday, September 22, 2011 16:09:29 Steven Schveighoffer wrote:
> >> Technically, something like this could be cast to immutable:
> >>
> >> T[] foo(const(T
On Thu, 22 Sep 2011 16:23:12 -0400, Jonathan M Davis
wrote:
On Thursday, September 22, 2011 16:11:05 Steven Schveighoffer wrote:
On Thu, 22 Sep 2011 16:09:29 -0400, Steven Schveighoffer
wrote:
> On Thu, 22 Sep 2011 15:44:21 -0400, Jonathan M Davis
>
> wrote:
>> On Thursday, September 22,
On Thu, 22 Sep 2011 16:15:20 -0400, Jonathan M Davis
wrote:
On Thursday, September 22, 2011 16:09:29 Steven Schveighoffer wrote:
Technically, something like this could be cast to immutable:
T[] foo(const(T)[] arg) pure
Since it can be proven that the result is new data.
So it doesn't *ne
On Thursday, September 22, 2011 16:11:05 Steven Schveighoffer wrote:
> On Thu, 22 Sep 2011 16:09:29 -0400, Steven Schveighoffer
>
> wrote:
> > On Thu, 22 Sep 2011 15:44:21 -0400, Jonathan M Davis
> >
> > wrote:
> >> On Thursday, September 22, 2011 23:36:40 Dmitry Olshansky wrote:
> >>> On 22.09
On Thursday, September 22, 2011 16:09:29 Steven Schveighoffer wrote:
> On Thu, 22 Sep 2011 15:44:21 -0400, Jonathan M Davis
>
> wrote:
> > On Thursday, September 22, 2011 23:36:40 Dmitry Olshansky wrote:
> >> On 22.09.2011 22:53, Jesse Phillips wrote:
> >> > The discussion on Reddit brought to my
On Thu, 22 Sep 2011 16:09:29 -0400, Steven Schveighoffer
wrote:
On Thu, 22 Sep 2011 15:44:21 -0400, Jonathan M Davis
wrote:
On Thursday, September 22, 2011 23:36:40 Dmitry Olshansky wrote:
On 22.09.2011 22:53, Jesse Phillips wrote:
> The discussion on Reddit brought to my attention that
On Thu, 22 Sep 2011 15:44:21 -0400, Jonathan M Davis
wrote:
On Thursday, September 22, 2011 23:36:40 Dmitry Olshansky wrote:
On 22.09.2011 22:53, Jesse Phillips wrote:
> The discussion on Reddit brought to my attention that pure functions
can
> return and assign to an immutable.
>
>
htt
On Thursday, September 22, 2011 23:36:40 Dmitry Olshansky wrote:
> On 22.09.2011 22:53, Jesse Phillips wrote:
> > The discussion on Reddit brought to my attention that pure functions can
> > return and assign to an immutable.
> >
> > http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_i
On 22.09.2011 22:53, Jesse Phillips wrote:
The discussion on Reddit brought to my attention that pure functions can return
and assign to an immutable.
http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/c2lsgek
I am trying to modify the example request to make use
The discussion on Reddit brought to my attention that pure functions can return
and assign to an immutable.
http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/c2lsgek
I am trying to modify the example request to make use of this, but have failed.
http://www.reddit.
18 matches
Mail list logo