On Wednesday, 23 August 2017 at 15:17:31 UTC, Moritz Maxeiner wrote:
On Wednesday, 23 August 2017 at 14:37:19 UTC, Steven Schveighoffer wrote:
On 8/23/17 9:12 AM, Mike Parker wrote:
To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is getting. I have a project I'd like to use it with if I can ever make the time for it!

The blog:



How do dynamic closures work without the GC?

Nice article, BTW.


They don't (right now, using dmd ~master), because they depend on druntime:


Sorry, I screwed up when pasting. Here's what I meant to post:

--- a.c ---
#include <stdio.h>
#include <stdint.h>

uint32_t foo();

int main(int argc, char** argv)
    uint32_t x = foo();
    printf("%d\n", x);
    return 0;

--- b.d ---
auto test()
    uint i = 42;
    return () {
        return i;

$ dmd -c -betterC b.d
$ gcc a.c b.d
Undefined symbols for architecture x86_64:
  "__d_allocmemory", referenced from:
      _D1b4testFNaNbNfZDFNaNbNiNfZk in b.o

Reply via email to