On Friday, October 11, 2013 16:27:53 ixid wrote: > On Tuesday, 8 October 2013 at 22:37:28 UTC, Walter Bright wrote: > > On 10/8/2013 9:22 AM, Dicebot wrote: > >> It is simply "@nogc" which is lacking but absolutely > >> mandatory. > > > > Adding @nogc is fairly simple. The trouble, though, is (like > > purity) it is transitive. Every function an @nogc function > > calls will also have to be @nogc. This will entail a great deal > > of work updating phobos/druntime to add those annotations. > > A very naive question but is there no way of analysing the > subfunctions to check their purity or lack of GC use rather than > having to annotate everything? D does need to be a little wary of > becoming too heavily annotated.
Attribute inferrence can only work with templates thanks to separate compilation. There's no guarantee that you have the source for the functions that you're using (unless a function is templated). So, there's no way to do the inferrence in the general case. - Jonathan M Davis
