[Issue 3356] Make pure functions require immutable parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 5 06:41:17 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3356



--- Comment #9 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> 2009-10-05 06:41:16 PDT ---
> Note that you can just look at the parameter list and distinguish levels of
> purity: if there are any non-immutable reference parameters, it's not cachable.
> I guess the question is whether that additional complexity is justified.

Yes, two flavors of pureness can be introduces, it should be documented, what
optimizations can be applied to them in relation to threading model. But isn't
it a lot of work to specify and implement two flavors of pureness at the same
time? At this time optimization for non-immutable arguments should be turned
off until it's implemented correctly. Does dmd perform any pure optimizations
at this time?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list