Can getHash be made pure?

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Mar 10 09:48:38 PST 2012


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. Just search for toString in Object, and add qualifiers to
it, then compile. You'll find a ton of errors caused by propagated
qualifiers. Fix those, and you'll find more, ad nauseaum.

After a few iterations of this, I found myself labelling almost every
method in Object, TypeInfo, and a whole bunch of other places. I'll need
to sit down someday to properly and thoroughly do this. Currently my git
branch is uncompilable due to a couple o' nasty places, and I'm ready to
throw in the towel. :-(

Maybe I'll just finish up the actual AA implementation first, then come
back to revisit pure/nothrow/const/@safe after the code itself is
actually working.


T

-- 
There's light at the end of the tunnel. It's the oncoming train.


More information about the Digitalmars-d mailing list