Live data from Hacker News

Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

github.com

101–103 of 103 posts

Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

#101
post #76
post #69

Earlier quoted context omitted.

Stop mixing C and C++, tons of people on Unix still hate C++ (Motif a bit less) for being un-Unixy and megacomplex, even more today. Die had Unix and C people created Plan9 and now Go, which is maybe the other succesor to C before Inferno and Limbo, where programming it's more simpler than the whole C and POSIX clusterfux (even Plan9 and 9front itself can be called a "Unix 2.0"). C++ is something else. Heck, it's oft…

It is probably worth noting that C++, like C/Unix, originated at AT&T Bell Labs and was originally referred to as "C with classes." Classes were implemented using a preprocessor. https://www.tuhs.org/Archive/Documentation/TechReports/USG_L...

Unix creators called Unix "dead and rotten" because the eulogy was done by Perl, and Plan9/9front and Inferno obliterated it. Ditto with C+POSIX against Plan9's C (and 9front) and Inferno vs Limbo, the grandparents of Golang, which is seen from Pike and so as the tool set C++ should have been.

Golang it's like Windows NT. C++ it's like Windows ME, it might have their cases on RT performance and multimedia because of having far less layers than NT, (and much better on single core), but it crumbles down fast and it was really easy to shoot yourself in the foot. Windows 2000 and XP killed it for the good.

Some day Golang would be performant enough (even with CSP) with multiple cores so all the 'performance' advanteges -suppossedly C++ brings- aren't needed at all.

Even C# can be as good as C++ today in tons of cases (AOT and emulators like Ryuyinx are not a bluff), even SBCL for Common Lisp too if you finetune the compiling options.

Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

#102
post #101
post #76

Earlier quoted context omitted.

It is probably worth noting that C++, like C/Unix, originated at AT&T Bell Labs and was originally referred to as "C with classes." Classes were implemented using a preprocessor. https://www.tuhs.org/Archive/Documentation/TechReports/USG_L...

Unix creators called Unix "dead and rotten" because the eulogy was done by Perl, and Plan9/9front and Inferno obliterated it. Ditto with C+POSIX against Plan9's C (and 9front) and Inferno vs Limbo, the grandparents of Golang, which is seen from Pike and so as the tool set C++ should have been. Golang it's like Windows NT. C++ it's like Windows ME, it might have their cases on RT performance and multimedia because of…

To clarify, I do agree with you that C and C++ have been two distinct languages for a very long time. And C++ doesn’t have much in common with POSIX.

What I disagree with is the idea that C++ was developed completely independently of C (and Unix) - it originated at Bell Labs and was initially just an extension of C with classes. If you looked at the document I linked to, you would see that Bjarne Stroustrup thanks Dennis Ritchie in it for being a source of good ideas and useful problems. I don’t think I need to explain who Dennis Ritchie was for C and Unix.

Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

#103
post #11

Author here, I posted this in Show HN but someone clearly beat me to it. So I'll repost my blurb from there. Various patterns for safer C programming have been cargo-culting around the industry for decades. Because the language evolves intentionally slowly, these patterns rarely get folded into the language as first-class constructs and are passed down through the generations in a sort of oral tradition of programmin…

This might be a dumb question, but using this + clang bounds-safety, whats the difference between this and something like Zig or Odin. What do you think C would need in order to reach the user experience of those languages?

> What do you think C would need in order to reach the user experience of those languages?

- A better, cross platform build system.

- Generics

- Ergonomic compile time metaprogramming (zig's comptime, rust's macro system, etc)

- Closures - or at least lambdas.

- The ability to return multiple values - eg tuples

- Sum types.

- A built in way to return an error | value from a function

- Defer / Rust's Drop

C is anaemic.

Post reply on HN