News for hackers. Stuff that matters.
Re:Three proposals for the C standard WG14 by jcranmer on Wednesday June 20, 2018 @08:30PM (#17361113)
> I am curious what is the next meaningful step beyond the C ABI and the C type system

The C ABI and type system omits a lot of stuff that could be useful. Some points off the top of my head:

* Vector types

* Multiple return values

* Functions with bound environments

* Coroutines

* Dynamically-sized callee-allocated structures (most notably lists)

* Distinguishing between "byte array" and "string" types

* Vtables

* Something that lets GC'd languages cooperate more nicely. I'm not sure how exactly to specify this, but this is the sort of thing we could have if we stopped insisting that everything must be in terms of C ABI.

Re:Three proposals for the C standard WG14 by geofft on Wednesday June 20, 2018 @11:30PM (#17361886)
Hm, are there any cases of two GC'd languages that interop well that were not designed to interop from day one (that is, JVM languages don't count)?

The only one that comes to mind is https://research.mozilla.org/2014/08/26/javascript-servos-on... , which is Rust (pre-1.0) and JavaScript, but that somewhat doesn't count because Rust isn't really a GC'd language. (This article was written about a year after the special syntax for garbage-collected references was removed and Gc<T> became just a thing in the standard library, and about a month before that type was also removed because it wasn't a very good GC.)

It seems to me that if you make your GC a purely refcounting system this is easier: you just need to specify how to incref and decref objects, and put a well-known function in the vtable for destroying and deallocating the object. I'd guess that's how things like GObject or Qt bindings in Python or similar languages work.

Re:Three proposals for the C standard WG14 by int_19h on Thursday June 21, 2018 @05:06AM (#17363347)
COM was an example of using refcounting to drive a richer cross-language object model. And these days, WinRT is another take on the same (and, indeed, is COM under the hood, but with a richer type system and metadata). So you can have e.g. JS interop with C# via WinRT, but only because their shared view of the world is all refcount-based.
Re:Three proposals for the C standard WG14 by iainmerrick on Thursday June 21, 2018 @02:34AM (#17362645)
If you codify things that some vendors (notably Microsoft) are already doing with their calling conventions, that would give you alignment specifiers, and vector types passed in SIMD registers.

I personally think ownership is a biggie. If I pass in a pointer, is it expected to outlive the call?

And buffer sizes, of course.

Re:Three proposals for the C standard WG14 by pjmlp on Thursday June 21, 2018 @04:47AM (#17363255)
Most of those features are available on UWP.