News for hackers. Stuff that matters.
Re:FlexBuffers by pjmlp on Sunday June 21, 2020 @03:08AM (#23590413)
Wrong, D has support for C++ FFI.

https://dlang.org/spec/cpp_interface.html

Re:FlexBuffers by kccqzy on Sunday June 21, 2020 @03:11AM (#23590423)
It supports neither templates nor ADL, the two of my examples.

In fact the doc says,

> Being 100% compatible with C++ means more or less adding a fully functional C++ compiler front end to D. Anecdotal evidence suggests that writing such is a minimum of a 10 man-year project, essentially making a D compiler with such capability unimplementable.

It then goes on to describe the pragmatic approach that doesn't allow full compatibility:

> D takes a pragmatic approach that assumes a couple modest accommodations can solve a significant chunk of the problem:

> matching C++ name mangling conventions

> matching C++ function calling conventions

> matching C++ virtual function table layout for single inheritance

Can you see how limited this subset of interoperable API is?

Re:FlexBuffers by gpderetta on Sunday June 21, 2020 @06:19AM (#23591135)
> matching C++ name mangling conventions

> matching C++ function calling conventions

> matching C++ virtual function table layout for single inheritance

Basically COM? Which is not surprising as it was designed as an OO native FFI.

Re:FlexBuffers by pjmlp on Sunday June 21, 2020 @06:24AM (#23591155)
And UWP improves on it, giving more C++ features across the ABI, basically what .NET v1.0 should have been all along.
Re:FlexBuffers by pjmlp on Sunday June 21, 2020 @05:02AM (#23590817)
I didn't state it supports 100% compatibility, and it is still better than being stuck with an OS ABI from the 70s, that is only meaningful when the underlying OS is written in C anyway.