Re: Purity with references and pointers

2010-09-20 Thread Don
Simen kjaeraas wrote: Jonathan M Davis jmdavisp...@gmx.com wrote: Except that since when is anything implictly convertable to immutable? Implicitly converted to const, yes. That happens often enough, but immutable? Anything that does not contain pointers or references to non-immutable data

Re: Purity with references and pointers

2010-09-20 Thread Kagamin
Jonathan M Davis Wrote: If a pure function takes a reference/pointer, does that state that the result of the function will be the same on two calls to it if the reference/pointer points to the same data in both cases or if the data itself is unchanged? If it's a matter of pointing to

Purity with references and pointers

2010-09-18 Thread Jonathan M Davis
If a pure function takes a reference/pointer, does that state that the result of the function will be the same on two calls to it if the reference/pointer points to the same data in both cases or if the data itself is unchanged? If it's a matter of pointing to the same data, then that could

Re: Purity with references and pointers

2010-09-18 Thread Simen kjaeraas
Jonathan M Davis jmdavisp...@gmx.com wrote: If a pure function takes a reference/pointer, does that state that the result of the function will be the same on two calls to it if the reference/pointer points to the same data in both cases or if the data itself is unchanged? If it's a matter

Re: Purity with references and pointers

2010-09-18 Thread Jonathan M Davis
On Saturday 18 September 2010 17:33:21 Simen kjaeraas wrote: Jonathan M Davis jmdavisp...@gmx.com wrote: If a pure function takes a reference/pointer, does that state that the result of the function will be the same on two calls to it if the reference/pointer points to the same data in

Re: Purity with references and pointers

2010-09-18 Thread Jonathan M Davis
On Saturday 18 September 2010 18:16:31 Jonathan M Davis wrote: I don't think that *anything* is implicitly convertable to immutable. const yes, but not immutable Actually, I guess that value types are implicitly convertible to immutable in the sense that you can create a new immutable value

Re: Purity with references and pointers

2010-09-18 Thread Simen kjaeraas
Jonathan M Davis jmdavisp...@gmx.com wrote: Except that since when is anything implictly convertable to immutable? Implicitly converted to const, yes. That happens often enough, but immutable? Anything that does not contain pointers or references to non-immutable data is implicitly