Another serialization topic, reduced scope
Gregor Mückl
gregormueckl at gmx.de
Wed Dec 11 22:25:42 UTC 2019
On Wednesday, 11 December 2019 at 18:53:56 UTC, Jacob Carlborg
wrote:
> On 2019-12-08 09:22, Tobias Pankrath wrote:
>
>> This should have a place in phobos, because it makes
>> interoperability across libraries easier.
>
> No, it should be in druntime. Then it's possible to attach the
> UDA's to symbols both in Phobos and druntime. For example,
> adding @ignore to Thread.
This points me in a completely different direction: you can't
annotate 3rd party libraries with annotations that these
libraries are unaware of.
I worked on a expansive C# project at one time where a 3rd party
GUI control was extracting info about presentation of properties
from attributes via reflection. The classes I had to feed into it
were data model classes that couldn't depend on the GUI. The
resulting code bent over backwards to inject the required
attributes at runtime based on a separately maintained database
that covered thousands of properties. I'm still amazed that this
worked. The main issue was keeping the database in sync with the
model code. Compile time checks on the consistency of these
external attributes would have been great.
More information about the Digitalmars-d
mailing list