D talk at Silicon Valley ACCU

via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon May 18 05:55:55 PDT 2015


On Monday, 18 May 2015 at 11:57:29 UTC, Per Nordlöw wrote:
> Could yet another function qualifier (or extended attribute) do 
> the job of checking this at compile time?

For comparison here's how M$ has solved it in their proposal 
under include <experimental/generator>

http://blogs.msdn.com/b/vcblog/archive/2014/11/12/resumable-functions-in-c.aspx

They specify yielded type a function header instead of at caller 
as

     generator<int> fib()

which is probably a bit less error prone.


More information about the Digitalmars-d-announce mailing list