How to use pure in D 2.0 question on Stack Overflow?

bearophile bearophileHUGS at lycos.com
Wed Jun 17 15:52:09 PDT 2009


Jeroen Dirks:
> Does anyone know the answer to this D related question on SO?
> http://stackoverflow.com/questions/1008803/how-to-use-pure-in-d-2-0/

I like this answer:
>you may have found case where the compiler's semantic analysis is not as good as your brain's.<

"pure" is something that has being added recently to D, so its semantics isn't fully refined yet. Walter & Don will hopefully keep working on it (adding optimizations, like pulling out pure calls from loops, adopting some strategy to keep purity even regarding changes in FP rounding modes, improving purity analysis for classes, etc) removing some of the current faults/limits.

But we have to keep looking for corner cases and possible bugs.
This is something I have written recently, Don may be interested:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=16907

Bye,
bearophile



More information about the Digitalmars-d mailing list