Live data from Hacker News

CobaltC – The Successor to C?

strawberry9.github.io

21–24 of 24 posts

Re: CobaltC – The Successor to C?

#21

This doesnt seems to be meaningfully different from Rust. > does not require tracing garbage collection Just call it garbage collection. (Applies in two ways: if you think that garbage collection subsumes reference counting then this language doesn’t require garbage collection in the sense that it also doesn’t require reference counting; if you think that garbage collection does not subsume reference counting then th…

It's less specified than rust. For example, you can bind references to individual collection elements here. It doesn't seem to prohibit borrowing a dynamically indexed element either, which is one hell of a static analysis lift. Seems like you can also have simultaneous references to distinct static indices (e.g. &mut arr[0] and &mut arr[1]) as long as you don't do invalidating operations, which isn't expressible in NLL or polonius. That's feasible for a borrowchecker at least.

Re: CobaltC – The Successor to C?

#22
According to ChatGPT, the CobaltC language specification does now (since the spec was recently updated with an errata) provide sufficient syntactic, structural, and semantic boundaries to begin high-level compiler implementation planning, despite intentionally leaving lower-level mechanical decisions to the developer.

Re: CobaltC – The Successor to C?

#24

Earlier quoted context omitted.

C3 is an embarrassing mess regarding integer types and sizes, missing C99's stdint.h defs, for example.

To clarify: C3 has fixed sized ints. Maybe the parent poster doesn’t like their names, but they are fixed sized, as follows: Name Size Signed bool 1 no ichar 8 yes char 8 no short 16 yes ushort 16 no int 32 yes uint 32 no long 64 yes ulong 64 no int128 128 yes uint128 128 no Source: https://c3-lang.org/language-overview/types/#integer-types

i reckon it's easy enough to alias the stdint.h types and define them in terms of the size definitions above. i'd forgotten that the C3 pointer types are the ones whose bit size varies by platform. mea culpa.
Post reply on HN