4 ms·
Interesting how C programming has survived that entire time period in the operating system and embedded worlds, although the spread of multicore hardware runnin
by photochemsyn 3y ago
Interesting how C programming has survived that entire time period in the operating system and embedded worlds, although the spread of multicore hardware running lots of threads in parallel has also led to many changes (but even those changes were beginning to be implemented 20 years ago).
20 years from now, C will probably still be a core language in its niche.
- 2muchcoffeeman 3y agoIs it interesting? Somewhere along the chain someone needs to know assembly. Either hand crafting it or some compiler exists for some language that is one step removed. At this level my feeling is that there is less desire to constantly change tools.
- imoverclocked 3y agoQueue rust apologists… I think C and its direct descendants will slowly fade away over the next 20 years as new developers want to get away from the legacy of language specifications that span existing codebases. There are so many sharp edges in C that have automatic fixes/detections/etc in newer languages and don’t get me started about multiprocessing complexity in C.
- dralley 3y agoIt will fade away the same way COBOL faded away, which is to say that it will still be at the core of a great many critical systems in 50 years, even if new critical systems aren't written in it.
- sgtnoodle 3y agoMy coworker and I were pair programming some Rust today. We were working on a convenience wrapper whose whole purpose is to reduce boilerplate. So, by its nature there's a lot of internal generic traits, thread safety, etc. He knows Rust well but software design not so much. I know software design well but Rust not so much. My experience can be summed up with: let &mut writer = Writer<T>::writer::new(connection.clone()).clone(); // TODO ??? writer.write(*data.clone()).unwrap(); Meanwhile in C++ I'm like if (!write(connection, data, data_len)) { return false; }
- urthor 3y agoSee as someone who knows Rust fairly well. let &mut -- Essential keywords. writer = -- Duh Writer<T> -- Generic types. Important. ::writer::new -- Boilerplate. (connection.clone()).clone; -- Relentless cloning is a big problem. ... .unwrap -- "Consistent names for optional types," is an issue in Rust. Every module has different jargon for Some(x). Rust certainly isn't perfect. The borrow checker creates... awkwardness, that requires .clone hacks to solve. Flip-side is, I'm coding in CMake right now. I've had to create multiple bash scripts for manually deleting my build files and general day to day. Software is a young profession. Everything is shit.
- tayo42 3y agoI feel like those clones don't get enough attention. At a glance, you don't really know what those clones are doing. Is it allocating, is just increasing reference counter? Makes code hard to understand
- urthor 3y agoclone() makes an immutable, deep copy/recursive copy of the original data structure. clone() itself makes perfect sense. Why the programmer needed those clones... is a legitimate issue with Rust. In my experience so far, it's usually to hack around an interaction between the borrow checker and the output of a function constructed using dot syntax.
- dist1ll 3y ago> clone() makes an immutable, deep copy/recursive copy of the original data structure. No. clone() calls std::clone::Clone::clone. For many std collections that means deep/recursive copy. For custom data structures, it can mean anything. It depends entirely on your implementation of the Clone trait.
- oriolid 3y agoAsking as someone who has tried learning Rust but didn't get very far, doesn't unwrap essentially mean "this might panic but I don't care to implement error handling here"?
- deleted 3y ago[deleted]
- chasil 3y agoSQLite's achievement of DO-178B compliance could carry C forward on it's own. Dr. Hipp spent years achieving this, and any reimplementation will suffer his travails, regardless of language safety. DO-178B means that SQLite can be used in avionics. No other major database has reached this level of code quality, as the database written for "programmers who are not yet born."
- miketery 3y agoThat's impressive! Is it a specific version and what features or is it a subset?
- chasil 3y agoThe certification was attained ~ 2008. All versions of SQLite released after that time are run through the test harness that maintains this standard.
- oskarkk 3y agoThis got me curious, so I searched for some info and found this thread on HN: https://news.ycombinator.com/item?id=18039213 https://news.ycombinator.com/item?id=18039213 Looks like it may not be used exactly in avionics (or maybe most critical parts of avionics), as it isn't certified for the highest levels of DO-178B (and certification for lower levels was done by particular users of SQLite on their own, so the info is not public). Still very impressive.
- chasil 3y agoIt was Rockwell-Collins in Cedar Rapids, Iowa that first urged Dr. Hipp to pursue this certification. They would not have done so if they had no plans or intention to deploy it. I would be surprised if they were not able to do so.
- SoftTalker 3y agoYep. C and SQL are the two languages I've used my entire career (30+ years). I still use SQL almost every day, C not as much. Shell scripts and unix utilities are in there as well as daily-use tools.
- userbinator 3y agoIt is, relatively speaking, far easier to write a C compiler[1] than one for any other higher-level language, and the language lends itself to low-level tasks without needing to use Asm. [1] There have been multiple articles on HN where a single person has written a C compiler.
- kragen 3y agolots of compilers have been written by a single person, including compilers for c++, d, turbo pascal, forth, scheme, ml, haskell, ancient lisp, and so on. craig burley got g77 to the point of compiling useful fortran programs before other people got interested. i think graydon wrote the first versions of the rust compiler himself too it's probably always better to do it with someone else, because you get better ideas and faster debugging, but pretty much all hlls are possible for a single person to implement
- binkHN 3y agoDon't look, but C is slowly being ripped out and replaced with Rust...