Earlier quoted context omitted.
Not lead designer :) But yes, Rust, or even in userspace, as newer and/or more microkernel-ish OS's allow for. Apple is doing work to allow drivers to be written in Swift...
I believe DriverKit is still C++.
So you think you know C? (2016)
201–210 of 344 posts
Re: So you think you know C? (2016)
#202Re: So you think you know C? (2016)
#203C is essentially a portable assembler. It’s not enough to learn the language, you need to have deep understanding of the underlying hardware and compiler infrastructure.
Re: So you think you know C? (2016)
#204Earlier quoted context omitted.
I couldn't agree more. After spending many years working with LLVM, which is at its heart a C compiler, and understanding why it has to do the sometimes-terrifying things it has to do to get C to run well, I've become very paranoid when writing C or C++. My C/C++ code is as boring as possible. (In fact I try to avoid writing C or C++ whenever possible these days; undefined behavior in the language is too pernicious a…
What would we write drivers in then if C was obsoleted?
Re: So you think you know C? (2016)
#205Re: So you think you know C? (2016)
#206Having written a conforming C compiler, at one point I knew everything there was to know about C (I forget details now and then, or confusing them with C++ and D). But knowing every engineering detail is not the same thing as knowing how to program in C effectively. It's like being the engineer who designs a Grand Prix car. It does not mean you can drive it faster around the track than anyone else. Not even close. Fo…
And that's why people claiming that C++ is more complicated than C because it has an even bigger specification miss the point. What counts is how easy to use in practice. You can get along just fine in C++ without knowing the exact aliasing rules from C or or how to specialize a template. What matters is that the extra features of C++ makes actual programming simpler, not harder. (for example destructor (RAII), stand…
Nope, you can't. These are exactly the things that introduce undefined behavior (i.e. total breakage) if you aren't very careful about what you're doing at all times. Don't take my word for it, check out what the C++ designers themselves state about the issue in the C++ Core Guidelines. C/C++ is far from simple, and thinking that you can just make things up as you go along is a serious mistake.
Re: So you think you know C? (2016)
#207Re: So you think you know C? (2016)
#208At the end of the test, the author talks about automation programming for a nuclear power plant. I don’t think I could ever sleep the same at night after writing something like that.
> I don’t think I could ever sleep the same at night after writing something like that In these situations, you likely know your hardware and know your compiler, so you can actually provide an answer for 4 of the questions. The last one is a situation where someone should tell you not to get cute in the code review. I wrote C in telecom and finance and in both places we enforced a rule: when you define a structure, p…
Re: So you think you know C? (2016)
#209Earlier quoted context omitted.
I couldn't agree more. After spending many years working with LLVM, which is at its heart a C compiler, and understanding why it has to do the sometimes-terrifying things it has to do to get C to run well, I've become very paranoid when writing C or C++. My C/C++ code is as boring as possible. (In fact I try to avoid writing C or C++ whenever possible these days; undefined behavior in the language is too pernicious a…
> My C/C++ code is as boring as possible. One advantage to being an older programmer is I don't feel any need to show off any more. I try to make it so obvious that anyone would look at it and think that's so simple, anyone could do it. It's surprisingly hard to write simple code. Any idjit can come up with Rube Goldberg code.
Re: So you think you know C? (2016)
#210If you want to see some real tricky C code, see some of the articles here: https://locklessinc.com/articles/