Live data from Hacker News

Learning C3

alloc.dev

51–60 of 163 posts

Re: Learning C3

#51

Most of these features have been used by countless C++ developers for the past decades -- I really don't see the point in adopting a language that's mostly C++ but without some of the warts. Either pick C++ or something like Rust.

I would prefer a "lightweight" C++.

C++ is fine, but it's insanely slow to compile.

I generally like C++, but I could trade anything to make it faster to compile, and most of the time, I just use a small subset of C++ that I feel okay with.

Re: Learning C3

#52
post #34

Interestingly there is also C2: http://c2lang.org

There's also C4, but that's either an explosive or a notation language for modeling software architecture.

Re: Learning C3

#53
post #36

Anyone know the story behind Huly (which appears to be a company making a web-app mostly in node) sponsoring C3?

As far as I am aware, they support open source as part of their marketing campaign, smart move in my view and helps grass roots projects, Win win.

Re: Learning C3

#54

Most of these features have been used by countless C++ developers for the past decades -- I really don't see the point in adopting a language that's mostly C++ but without some of the warts. Either pick C++ or something like Rust.

the problem with picking C++ is that eventually you onboard someone who uses the warts in their code, and then the warts become like craft glitter.

Maybe instead of building a restricted C++ we should be building parsers that restrict what C++ features we use.

Re: Learning C3

#55

Most of these features have been used by countless C++ developers for the past decades -- I really don't see the point in adopting a language that's mostly C++ but without some of the warts. Either pick C++ or something like Rust.

Is for the C++ without Classes crowd, mostly.

Personally when I initially learned C++ back in 1993, with Turbo C++ 1.0 for MS-DOS, I hardly saw a reason to further use C instead C++, other than being required to do so.

Re: Learning C3

#56
post #50
post #23

Earlier quoted context omitted.

There is also Odin: https://odin-lang.org/ Would be nice to have a list of these and comparisons

There is also C23 and at some point C2Y. C23 got typeof, constexpr constants, enums with underlying type, embed, auto, _BitInt, checked integers, new struct compatibility rules, bit constants, nullptr, initialization with {}, and various other improvements and cleanups. Modern C code - while still being simple - can look quite different than what people might be used to. C2Y already already got named loops, countof,…

What's the state of things regarding statement expressions? Are there any intentions of adding them? I think I've read Meneide make an offhand comment about that.

Re: Learning C3

#57

This looks promising, but I wonder what advantages it has over Rust. Community support is very important for a programming language, and given that this is the first time I am hearing about this project, it still has some way to go. Edit: ABI compatibility & two way interop with C seems to be a pretty big selling point!

Community support in C3 is massive, as you can use C libraries directly, it might parallel or exceed Rust on that metric, and the barrier to adding native C3 wrappers or versions is significantly lower too.

Rust is solving a different problem, that of safety over all else. C3 on the other hand is more akin to developer experience above all else.

If you find something that should be easier to do in C3, that's a bug.

Re: Learning C3

#58
post #47
post #4

> Don't misunderstand me - I love using foreach in other languages; the added syntax better expresses your intent, reducing logic errors. It did jump out at me as "this isn't C" though. Because it's not. The whole point of C is that you know exactly what's going on and it's relatively clear in the code itself. C++ hides logic in abstractions for the sake of convenience. This is a C++ thing. How does it know how to it…

This is a completely valid and reasonable argument; I don't understand why people are downvoting it.

Votes on HN are fairly random.

Re: Learning C3

#59

Most of these features have been used by countless C++ developers for the past decades -- I really don't see the point in adopting a language that's mostly C++ but without some of the warts. Either pick C++ or something like Rust.

C3 benefits from focusing more on the problem at hand than language complexities.

There are definitely advantages to simpler tools, you can streamline development and make people more productive quicker. Compare that scenario to C++ where you first have to agree the features you're allowing and then have to police that subset throughout on every PR.

Re: Learning C3

#60
post #56
post #50

Earlier quoted context omitted.

There is also C23 and at some point C2Y. C23 got typeof, constexpr constants, enums with underlying type, embed, auto, _BitInt, checked integers, new struct compatibility rules, bit constants, nullptr, initialization with {}, and various other improvements and cleanups. Modern C code - while still being simple - can look quite different than what people might be used to. C2Y already already got named loops, countof,…

What's the state of things regarding statement expressions? Are there any intentions of adding them? I think I've read Meneide make an offhand comment about that.

This is being discussed. It has some weird corner cases and limitations though. But since it is widely used and supported, I think there is a good chance that some harmonized version of it will be standardized.
Post reply on HN