Can getHash be made pure?

Dmitry Olshansky dmitry.olsh at gmail.com
Sun Mar 11 00:04:57 PST 2012


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 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
>

At least @safe 'leak' could be temporarily plugged with @trusted.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list