excel-d v0.0.1 - D API to write functions callable from Excel

Laeeth Isharc via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Apr 24 19:07:46 PDT 2017


On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote:
> Now with more `@nogc`. Before, this worked fine:
>
> double func(double d) @nogc nothrow { return d * 2; }
>
> The function is `@nogc`, the wrapper function (i.e. the 
> function that Excel actually calls) is also `@nogc` via the 
> magic of compile-time reflection. So far, so good. But what if 
> you want to return a string or an array back to Excel. Oh, oh...
>
> Enter the `@Dispose` UDA:
>
> And Bob's your uncle.
>
> Atila

Very nice.
On reddit here since it's a pretty nice example of how you don't 
need to use dark magic to write code in D without depending on 
the GC:
https://www.reddit.com/r/programming/comments/67dogy/writing_excel_addins_in_d_without_using_the/


More information about the Digitalmars-d-announce mailing list