Re: Can getHash be made pure?

2012-03-11 Thread Dmitry Olshansky
On 10.03.2012 21:48, H. S. Teoh wrote: On Sat, Mar 10, 2012 at 06:21:08PM +0100, Jacob Carlborg wrote: On 2012-03-10 04:21, Martin Nowak wrote: On Sat, 10 Mar 2012 03:18:59 +0100, Walter Bright Yeah, I know, it's viral. Can't do it piecemeal. Bottom-up instead of top-down? Hard to find

Re: Can getHash be made pure?

2012-03-10 Thread Jacob Carlborg
On 2012-03-10 04:21, Martin Nowak wrote: On Sat, 10 Mar 2012 03:18:59 +0100, Walter Bright Yeah, I know, it's viral. Can't do it piecemeal. Bottom-up instead of top-down? Hard to find somewhere to start? -- /Jacob Carlborg

Re: Can getHash be made pure?

2012-03-10 Thread H. S. Teoh
On Sat, Mar 10, 2012 at 06:21:08PM +0100, Jacob Carlborg wrote: On 2012-03-10 04:21, Martin Nowak wrote: On Sat, 10 Mar 2012 03:18:59 +0100, Walter Bright Yeah, I know, it's viral. Can't do it piecemeal. Bottom-up instead of top-down? Hard to find somewhere to start? [...] Not that hard.

Re: Can getHash be made pure?

2012-03-10 Thread Alex Rønne Petersen
On 10-03-2012 18:48, H. S. Teoh wrote: On Sat, Mar 10, 2012 at 06:21:08PM +0100, Jacob Carlborg wrote: On 2012-03-10 04:21, Martin Nowak wrote: On Sat, 10 Mar 2012 03:18:59 +0100, Walter Bright Yeah, I know, it's viral. Can't do it piecemeal. Bottom-up instead of top-down? Hard to find

Can getHash be made pure?

2012-03-09 Thread H. S. Teoh
Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be marked pure. Is it possible to make

Re: Can getHash be made pure?

2012-03-09 Thread Walter Bright
On 3/9/2012 1:54 PM, H. S. Teoh wrote: Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be

Re: Can getHash be made pure?

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 02:01:01PM -0800, Walter Bright wrote: On 3/9/2012 1:54 PM, H. S. Teoh wrote: Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a

Re: Can getHash be made pure?

2012-03-09 Thread Walter Bright
On 3/9/2012 5:15 PM, H. S. Teoh wrote: I tried to make getHash() const pure nothrow @safe, but found that in some places it calls toHash() which isn't marked const pure nothrow @safe. So I fixed that as well, then found that toHash() calls toString() which isn't pure, nothrow, nor @safe... and

Re: Can getHash be made pure?

2012-03-09 Thread Martin Nowak
On Sat, 10 Mar 2012 03:18:59 +0100, Walter Bright newshou...@digitalmars.com wrote: On 3/9/2012 5:15 PM, H. S. Teoh wrote: I tried to make getHash() const pure nothrow @safe, but found that in some places it calls toHash() which isn't marked const pure nothrow @safe. So I fixed that as

Re: Can getHash be made pure?

2012-03-09 Thread Walter Bright
On 3/9/2012 7:21 PM, Martin Nowak wrote: Bottom-up instead of top-down? both.