9 ms·
I'm puzzled with what the market for these kinds of languages are. C is sort of a dead end. There is very little innovation there. And that's fine; the users o
by EdSchouten 4y ago
I'm puzzled with what the market for these kinds of languages are.
C is sort of a dead end. There is very little innovation there. And that's fine; the users of the language seem to want it that way. They just want to write software the same way they've been doing for the last 20 years. Why would such a conservative user base want to switch to a different language like C3?
Linus once said this about Subversion: "Subversion has been the most pointless project ever started... Subversion used to say, 'CVS done right.' With that slogan there is nowhere you can go. There is no way to do CVS right." Could C3 be the Subversion of programming languages?
- rwbt 4y ago> I'm puzzled with what the market for these kinds of languages are. There's a significant number of C programmers who want something slightly more modern and convenient but don't want to write C++ due to a number of reasons. I think Zig, D are examples of this niche but syntax wise they don't completely look like C.
- bachmeier 4y ago> I think Zig, D are examples of this niche but syntax wise they don't completely look like C. This is technically true, but someone that likes writing C while wanting a few extra features would mostly be able to write the same C code they always have if they stick to D's betterC. (I'm not familiar enough with Zig to comment on that.) Edit: Should also add that D now compiles C code, so a C programmer could continue to write C as they want, write a few D functions where those features help, and compile them without writing any binding code.
- com2kid 4y ago> I think Zig, D are examples of this niche but syntax wise they don't completely look like C. That is because C's type declaration format is provably, as in actually provably, terrible. There is a reason the majority of modern languages have switched away from how C declares types. Honestly it'd be nice if the C committee could find a way to tack on a new variable declaration syntax to C, so everyone didn't have to keep looking up, or using tools, to declare non-trivial function pointers.
- __d 4y agoPlease, just no. The C committee should do basically nothing. If someone, somewhere, finds an actual bug in the spec, then fine -- fix that. But don't go adding new features. If you want something new, then make a new language. Leave C alone.
- Gibbon1 4y agoAs someone who actually uses C I think the C standards committee needs to be taken on a one way to trip out behind the barn for the crime of being useless. They've had 30 years to fix things like C not having arrays, lack of modules and name spaces. Purists can always use std=-c89.
- com2kid 4y ago> If you want something new, then make a new language. Adding an optional new declaration syntax isn't a new feature, it is a change to the parser. C's declaration syntax is awful. In fact I'd go so far as to claim that one reason function pointers aren't heavily used in C as compared to modern C++, C#, JavaScript, etc, is purely because the syntax around them is so awful. (They obviously are used, but no one likes using them)
- 0xFACEFEED 4y ago> C is sort of a dead end. There is very little innovation there. C is a small language. There are benefits to that. But it also has a handful of historical oddities. Innovation here means to keep C small while also getting rid of those quirks. C++ is enormous. Rust is headed in the direction of similar enormity.
- stormbrew 4y ago> C++ is enormous. Rust is headed in the direction of similar enormity I don't think this is a fair characterization of rust really. For the most part the things on the horizon still for rust seek to reduce complexity by filing down sharp edges that force you to write complicated code. Stuff like GATs seem complicated until you repeatedly slam your head into the lack of them trying to do things that "seem" natural. C++ on the other hand (after 2011) just never saw an idiom it didn't like enough to throw on the pile and there's little coherence to the way the language has grown in the last decade.
- smingo 4y ago> there's little coherence to the way the language has grown in the last decade. IMHO it's been incoherent from the earliest times. The lame exceptions without 'finally', and no consistency in exception types. Then the desperate attempts to make all resources into objects, except that practically no OS calls bothered with this. The overloading of the shift operators in the standard library. Indeed, operator overloading itself is just a recipe for abuse. You read 'a=b+c' and you literally have no clue what that means. Multiple inheritance with the brittle semantics. The awful STL, with its multi-kB error messages (the allocator of the trait of the string of the tree of map of king Caractacus doesn't match ...) There's no wonder the 'obfuscated C competition' never happened with C++ given the fact it's unreadable, right out of the box.
- labrador 4y agoI was jokingly thinking C++ needs Douglas Crockford to write "C++: The Good Parts" but of course a quick search reveals there already is one https://www.amazon.com/C-Good-Parts-Gregory-Satir/dp/1449319696 https://www.amazon.com/C-Good-Parts-Gregory-Satir/dp/1449319...
- 0x20cowboy 4y agoI love C because it’s so minimal. And it’s not a dead end at all - embedded systems, wasm, wasi, really fast things, and aside from assembly it’s one of the first things on newer platforms (risc v for example). I like Go for the same “try to keep it minimal” reasons, and keen to try Zig when I have some time. I think the bias you are implying might be misplaced.
- com2kid 4y agoThe problem with C is that its... kind of minimal, but it also needs tons of extensions to get things done. Want multiple heaps? That'll be a compiler extension. Want to specify exactly where a variable is laid out in memory? Compile extension. Have a memory layout that isn't just a flat map of address space? Better reach for a compiler extension. Hardware registers? Eh, overlay it with a union or a struct or something, it'll be fine. Unless you want some sort of non-trivial typing on those registers. People forget that C is written against an abstract C machine. C is not written against the underlying hardware platform. And the abstract C machine may differ from your target hardware by a fair bit.
- kaba0 4y agoWhy would C be the requirement for “really fast things”? It doesn’t even have any support for SIMD instructions other than going inline assembly.
- markdestouches 4y ago
- kloch 4y ago> C is sort of a dead C is like a table saw without a blade guard. Simple yet precise, powerful, flexible, and will cut your fingers off if you aren’t careful. But it’s often exactly the kind of dangerous saw we need sometimes. There’s no point in trying to improve it - there are plenty of other, safer saws for that.
- deleted 4y ago[deleted]
- mst 4y agoThis is kinda my opinion too. C is awful, C is terrible, C is almost always the wrong answer. But when it hits the spot, it's a fantastic wrong answer for a bunch of things.
- billforsternz 4y ago> They just want to write software the same way they've been doing for the last 20 years. Actually I just want to write software the same way I've been doing it for the last 40 years, but otherwise yeah.