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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au




--- Comment #3 from Don <clugd...@yahoo.com.au>  2009-06-08 17:45:49 PDT ---
(In reply to comment #0)
> Created an attachment (id=395)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=395) [details]
> Add pure annotations throughout std.core.*
> 
> I did a quick pass through core.stdc.* to annotate the functions I believe
> should be pure.  I added some comments for several that could be stretched to
> be pure if we're a little looser with the definition of pure.  I skipped over
> the floating point areas as there's been a good amount of debate that I 
> haven't
> followed over what to do with them.  I defer to Don and Walter on those.

Almost all functions in stdc.math cannot possibly be pure, because they set the
global 'errno'. (This is part of the reason why it has been worthwhile to
re-implement most C math functions in D). There are a few functions (like
fpclassify() and the trivial functions which use it) which _could_ legally be
marked as pure, but I really don't think that use of stdc.math should be
encouraged in any way in D code. So the math stuff is not a TODO list thing, it
should stay as impure.

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

Reply via email to