News for hackers. Stuff that matters.
Re:Relive: 50 years of C, the good, the bad and the ugly by kazinator on Saturday December 31, 2022 @12:37PM (#34198640)
* * *
Re:Relive: 50 years of C, the good, the bad and the ugly by WastingMyTime89 on Saturday December 31, 2022 @01:09PM (#34198992)
> Not char/byte C strings. You might be thinking of wchar_t strings.

No I’m talking about the classic byte arrays C pretends are strings. If the receiver you are talking to is not expecting a chain of bytes where each byte is a character and one special value means the chain is over, well, you will have to transform what you are sending to what your receiver is expecting.

Re:Relive: 50 years of C, the good, the bad and the ugly by kazinator on Saturday December 31, 2022 @07:12PM (#34202136)
If somebody's expecting something other than a C string then we unsurprisingly have gratuitous complications. If everyone agrees on the C string though, it just interoperates as-is. Code compiled for some 16-bit microcontroller can just shove the C string into its transmit buffer, and on the other end, code compiled for 64 bit big-endian Power PC receiver just uses it as-is.
Re:Relive: 50 years of C, the good, the bad and the ugly by timbit42 on Sunday January 01, 2023 @11:35AM (#34207747)
C is the biggest mistake in the software industry since the beginning of software. The people that worship C only do so because they haven't seen the better paths the software industry could have chosen.
Re:Relive: 50 years of C, the good, the bad and the ugly by kazinator on Monday January 02, 2023 @12:15AM (#34214613)
E.g. Donald Knuth hadn't seen better paths.

"I think C has a lot of features that are very important. The way C handles pointers, for example, was a brilliant innovation; it solved a lot of problems that we had before in data structuring and made the programs look good afterwards. C isn't the perfect language, no language is, but I think it has a lot of virtues, and you can avoid the parts you don't like. I do like C as a language, especially because it blends in with the operating system (if you're using UNIX, for example).

All through my life, I've always used the programming language that blended best with the debugging system and operating system that I'm using. If I had a better debugger for language X, and if X went well with the operating system, I would be using that."

Dec 7, 1993, Computer Literacy Bookshops Interview.

Re:Relive: 50 years of C, the good, the bad and the ugly by asveikau on Monday January 02, 2023 @02:50PM (#34222748)
This is ridiculous hyperbole.

Nobody "worships" C and people who have positive experiences with C often have exposure to higher level languages.

You can find strengths or upsides in C and still acknowledge faults, and still acknowledge merits elsewhere.