fruediger/SemPtr ? reverse-engineered prompt
Reverse engineered prompt
Build me a C# .NET library called SemPtr that gives safer, more expressive pointer types than raw pointers. I want the library to let me represent things like nullable pointers, persistent pointers, read only pointers, uninitialized pointers, typed and untyped pointers, and sequence pointers, so the type name itself tells me how it can be used. It should enforce as much as possible at compile time and also check the important stuff at runtime, especially null handling and unsafe misuse.
Please include a clean public API, good examples in the docs, and tests that show the different pointer behaviors. If this needs modern .NET interop support, include that too, especially custom marshalling so these pointer types can work with native library imports without a lot of extra work. Keep it practical and well organized, and look up current .NET docs online if you need to.
Are you gonna build this?
make sure you review the code using arcumet