Earlier quoted context omitted.
> It's really not, though. What C is an abstraction of is computer architecture as it existed by the late 1960s. I don't follow. Barring micro-code, hardware is designed for executing either RISC or CISC instructions. If anything, the industry has matured and we see less esoteric ISA's today than in the 1960s.
A modern low level labguage would expose you to the concepts of cache lines and homogeneous and eterogeneous cores directly, with locality awareness to recognize false sharing. It would be something suitable to program the Cell architecture from PS2.
50 years of C, the good, the bad and the ugly [video]
151–160 of 257 posts
Re: 50 years of C, the good, the bad and the ugly [video]
#152The more I learn about new and less new languages (Zig, Jai, C#) the more I like C and its true simplicity. The language has a few irritating historical artefacts and the stdlib API is completely outdated and full of bad design, but there it is still versatile enough for my needs.
Re: 50 years of C, the good, the bad and the ugly [video]
#153Earlier quoted context omitted.
> HN really is a joke sometimes. A lot of what I'm seeing from your comments here is you can't handle people who have something positive to say about C. They're not saying it's the one true way or something. Just that they like it in some respect. And your attempts to dismiss that and call "HN" a joke for harboring someone who thinks this way look kind of childish to me.
Then you are seeing what you want to see. People are straightforwardly arguing that C is semantically rich which is indeed laughable. I have addressed the point under but clearly a lot of you don’t understand what language semantics are. Considering I was having interesting discussion about the subtleties of the Hindley-Milner type system on this same website a decade ago, yes, I do think HN is becoming a joke. The j…
Small example, linked lists. I don't think non-C linked list code tends to be as straightforward as I've seen in C.
Or the character-at-a-time style of string processing. It's kind of unique to C.
You can say there is stuff about that you don't like. That's fine. Linked lists suck with modern CPU caches anyway. C strings have lots of misadventures in terms of buffer overflows. But it's unique and interesting. Lots of elegant things have been written this way. Your unfamiliarity with it doesn't make it "a joke" to point this out.
I have my own gripes with HN. Try mentioning politics and it brings out all sorts of fascist-sympathizing crazies. But saying good to neutral things about C (while not even universally praising it) is not one of those issues.
Re: 50 years of C, the good, the bad and the ugly [video]
#154Earlier quoted context omitted.
The argument is not about what can and can’t be done in C. C is Turing complete and low level. You can do anything in C. The debate is not even about if it’s good idea (I don’t think it is but that’s separate). The question is about C semantics. Given the reply I get it’s pretty obvious that some here don’t understand what language semantics are. It’s about the amount of concepts you can express in the language. Hask…
You’re whitewashing history if you think Pascal was superior to C. There was no conspiracy among compiler developers as you imply. Also you complain about semantic richness of C, but then only point to semantically rich languages you despise. A curious reader would wonder: why care about semantically rich languages then? An observant reader would wonder: so aren’t there times where semantic richness is not useful?
I’m not even complaining about the semantic richness of C. I’m just stating the fact that it doesn’t really have semantic richness. Then again don’t get me wrong. I do think C is a terrible language and I say that having worked on a C static analyser. It’s full of avoidable undefined behaviours and silly sharp edges.
Thankfully, nice languages with rich semantic exist. I was just pointing some I don’t like to separate the issue of semantic richness from likability. I enjoyed working in Ada a lot. Ocaml is awesome. I have never used Rust but from what I have seen that seems nice.
Semantic richness is useful because it helps programmers express what they want to do in way which are clearer and therefore more likely to be correct.
Re: 50 years of C, the good, the bad and the ugly [video]
#155Earlier quoted context omitted.
Have you looked at Nim? https://nim-lang.org/ or Zig? https://ziglang.org/ or D? https://dlang.org/
Yes I know about all of them, they're all a bit too complex for my taste. They're great languages, but they're not what I want.
So, go for it, and keep us updated on your progress. Good luck.
Re: 50 years of C, the good, the bad and the ugly [video]
#156Re: 50 years of C, the good, the bad and the ugly [video]
#157Earlier quoted context omitted.
Art is often about constraint, and mastery of simple tools. I identify with @antirez's sentiment. I know both C and C++ very well. I find C definitely more artistic. C++ is utilitarian. Prolog is the other language I code in "artistically". It too is quite simple and constrained, though it is on the opposite end of the high/low-level spectrum as C.
What is your take on Perl and Ruby? They seem to be the two languages where the communities themselves talk the most about poetry and elegance.
I've never used Ruby but from what I've seen I understand it to be similar to Perl in that regard.
Re: 50 years of C, the good, the bad and the ugly [video]
#158Re: 50 years of C, the good, the bad and the ugly [video]
#159The more I learn about new and less new languages (Zig, Jai, C#) the more I like C and its true simplicity. The language has a few irritating historical artefacts and the stdlib API is completely outdated and full of bad design, but there it is still versatile enough for my needs.
I like C89 for its simplicity too but after using the Jai beta for over a year I have a hard time seeing myself ever going back.
Re: 50 years of C, the good, the bad and the ugly [video]
#160A different take on the matter: I write code mainly artistically, and I found that C is one of the best languages available to code as a form of art. It allows to be both brutal and honest, or abstract and deceiving. Not many languages are so semantically powerful.
What are your goto sources of knowledge for C? I’m learning it to write embedded stuff and so far it’s mainly the k&r book, one from no starch press, and a udemy course. Thanks!