News for hackers. Stuff that matters.
Re:Pointers Are More Abstract Than You Might Expect in C by bluejekyll on Monday July 02, 2018 @01:30PM (#17443665)
I won't do this justice, so I'll point you to the Rust book on this subject: https://doc.rust-lang.org/book/second-edition/ch19-01-unsafe...

In short, at the moment, if you want a stable ABI, you must export an un_mangled C interface. This is easy enough. One of my favorite sites is this for FFI stuff: http://jakegoulding.com/rust-ffi-omnibus/

It covers a bunch of languages, and suggests techniques for overcoming any complexity in exposing higher order types.

Re:Pointers Are More Abstract Than You Might Expect in C by cryptonector on Tuesday July 03, 2018 @01:57AM (#17447888)
I wasn't criticizing Rust, and I'm aware of what you linked. The point I was making is that this sort of functionality is a sine qua non for C-replacement languages. That Rust has it is to its credit, and one reason that I think it is a very good C-replacement language.