|
30 years of research on memory safe C/C++ should be enough. It’s time to suck it up, take the best available memory safety solution, and just turn it on by default for a major open-source OS distribution such as Ubuntu.... If the safe-by-default experiment succeeded, we would have (for the first time) a substantial user base for memory-safe C/C++. There would then be an excellent secondary payoff in research aimed at reducing the cost of safety, increasing the strength of the safety guarantees, and dealing with safety exceptions in interesting ways. Would it be better to just stop using C/C++ instead of making them safe?
|
|
|
|
|
Yes, I have to agree. From what I understand, properly done, C# is just about as fast as C++. Obvously still a need to have the ability to bypass automatic memory management
|
|
|
|
|
You'd wish that would be true, but, especially in numerical areas and making use of all of your processor vector instructions .NET is not great. Also note the recent shift away from .NET towards native. MS needed to get better performance in order to get decent battery life on tablets and phones.
Wout
|
|
|
|
|
Terrence Dorsey wrote: Would it be better to just stop using C/C++ instead of making them safe?
Yeah, they should just the write the whole OS in javascript/c#/whatever. I'm sure the tiny performance hit would be worth the "safety"
|
|
|
|
|
In a word no, and no they can't make them safe either. Witness C# and Java. All these years of 'safety' and nothing of any serious size or complexity stands up unless manual memory management is used and when it's not memory sizes still balloon and effective leaks still occur.
The safest systems are the most transparent systems where there is little or nothing 'under the hood', in fact there is no hood. Then and only then can the smallest problem be seen for what it is the moment it arrises and hence fixed.
To put it another way, in space there are no 'no user servicable parts inside, do not void warranty by opening' sealed units.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Terrence Dorsey wrote: Would it be better to just stop using C/C++ instead of making them safe?
For most new development yes; but for performance sensitive apps GC pauses aren't acceptable and the cost of porting billions of lines of legacy code to a new language is beyond prohibitive (see COBOL[^]).
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|