Interfacing D with C: Arrays and Functions (Arrays Part 2)
Steven Schveighoffer
schveiguy at gmail.com
Tue Apr 28 19:22:59 UTC 2020
On 4/28/20 10:45 AM, Mike Parker wrote:
> I've finally gotten around to publishing the next article in my D and C
> series on the D blog. This is the second post about arrays, focusing on
> properly declaring in D functions from C that accept array parameters.
>
> The blog:
> https://dlang.org/blog/2020/04/28/interfacing-d-with-c-arrays-and-functions-arrays-part-two/
>
>
> Reddit:
> https://www.reddit.com/r/programming/comments/g9o3wi/interfacing_d_with_c_arrays_and_functions_arrays/
>
>
> HN:
> https://news.ycombinator.com/item?id=23007409
Nice! I was ready to respond with what turns out to be the punchline
here -- using ref ;)
That little bit of sorcery is an excellent trick that can make a world
of difference when it comes to compiler-enforced correctness.
-Steve
More information about the Digitalmars-d-announce
mailing list