Weird
Weird
Posted Aug 14, 2016 4:31 UTC (Sun) by neilbrown (subscriber, #359)In reply to: Weird by ncm
Parent article: Better types in C using sparse and smatch
I have no doubt that you are correct, but these new insights do not come for free. Much as I love learning new things, I know that my capacity to do this is limited so I need to pace myself. Had I decided to write this project in Rust, I am quite confident that I would not have progressed a far as I have. Sometimes it makes sense to work with what you've got, even if that is "C".
Also, you are making an assumption that is worth highlighting. You are assuming that if some language is problematic, then the solution is to use a different language. I understand the thinking behind that assumption because programming languages have always effectively been isolated silos. But the "replace" approach doesn't always work so well: witness Python 3.
Maybe there is another way. A significant strength of the Linux kernel project is the incremental approach to improvements. Today's kernel is very different from Linux 1.0, but it is still "the same Linux". What if we could do that with a Language? The C standards process does to an extent, and "C11" is still "C", even though it is very different to K&R C. But there a limits to how much change can happen there.
It has always been possible for different projects to use different versions of C, thanks to the macro pre-processor. Having "list_for_each_entry" and similar is the kernel is a real boon.
Having pluggable semantic checks could be seen as just another step in that sort of approach. Why are you so sure that replacing C is a better approach than making C better.
I like the familiarity and universality of C, and the safety of Rust. Why should I not want both?
> It's hard to believe...
I would suggest that the evidence is against you there. My own observations tell me that people are, in general, quite capable of believing whatever they want to believe.
So I think you are really saying "I don't want to believe...". I assure you that I completely support your right to believe whatever you choose, but know that I will likely make different choices.
Posted Aug 15, 2016 2:52 UTC (Mon)
by ncm (guest, #165)
[Link] (3 responses)
Learning Rust would certainly slow you down, for a while. Rust is mostly an opportunity for the next generation of serious programmers, and those who will teach them. But before you know it, the most interesting programs will be coded in Rust, and you will need to know it to read them.
Posted Aug 18, 2016 12:07 UTC (Thu)
by tuna (guest, #44480)
[Link]
Posted Aug 18, 2016 16:26 UTC (Thu)
by Wol (subscriber, #4433)
[Link] (1 responses)
Why then, looking at lilypond and libreoffice C++ code, do I think "what the hell is going on here", yet when I looked at the (C) code for mdadm, I felt at home straight away?
Or, trying to write my pet project in C++, I'm left wondering how on earth I interact with the hardware to the extent that I actually know what is going on at the hardware level?
Cheers,
Posted Aug 18, 2016 16:37 UTC (Thu)
by andresfreund (subscriber, #69562)
[Link]
Huh? There's no difference between C and C++ on that end of things.
Weird
Weird
Weird
Wol
Weird