On 2020-10-20 02:16, Ali Çehreli wrote:
Everything works at least on Linux. Is this kosher, or am I using some internal knowledge?
Yes, you're using some internal knowledge. You cannot assume it works on any other platform or architecture. In theory, the D compiler could choose to change the ABI for passing D arrays and this would break. If fact, the ABI documentation [1] doesn't mention how a D array is passed. A different compiler could choose to pass it differently.
[1] https://dlang.org/spec/abi.html#arrays -- /Jacob Carlborg