TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Systems programming laanguage of the future?

1 点作者 globalrev超过 16 年前
Most OSes and systems programming in general is mostly done in C (and C++?).<p>The language has some clear flaws from what I understand but there aren't really any alternatives are there?<p>Why is C so fast? Because people make it fast or because it is easy to write fast compilers for it?<p>Why aren't other languages used for writing OSes? They just don't have the speed? JAVA is used a lot for server-programming right? But doesn't cut it speedwise for OSes?<p>As we move to the cloud and the OS becomes less important will C disappear as new systems replace the old ones?<p>But you will still need some small basic OS right? So will people program in C in 10 years or will compilers have gotten so smart will be writing that in Haskell, Python or JAVA?<p>Why hasn't anyone created a better systemprogramming langauge?

5 条评论

silentbicycle超过 16 年前
I've heard several times (citation needed, I know. Anybody?) that processors have gradually been tuned to perform better with machine language that has artifacts from C compilation in it, or something like that. I would love details. (Related: <a href="http://www.c2.com/cgi/wiki?CeeAsAnIntermediateLanguage" rel="nofollow">http://www.c2.com/cgi/wiki?CeeAsAnIntermediateLanguage</a>)<p>Python won't be used as a systems programming language because it's relatively slow compared to most compiled languages (though many parts of its library are compiled C) due to two major strikes against it: It's interpreted (albeit with some bytecode caching), and it doesn't (yet) have a clear way to declare/infer types for optimization, so a lot of cycles get burned double-checking data types. In practice, it's usually fast enough for most purposes -- its design focused on speed of development over than execution, which is a good tradeoff overall, but works against it for systems programming (except prototyping).
warwick超过 16 年前
Off the top of my head, I'd say that C is used for systems programming due to direct addressing of memory via pointers and it being as low level as you can get without getting into machine specific assembly. Speed is more of a byproduct of being extremely low level since you've got very low overhead.<p>I'd be curious what you see as the inherent flaws in C, and what would you want to see out of a better systems language?
评论 #285586 未加载
rincewind超过 16 年前
There are operating systems in other, higher-level languages: Singularity, JNODE, Genera, SqueakNOS, Movitz, but:<p>C is not garbage collected. If you write an OS in a dynamic language you need either a GC in a low-level language or one that does not produce garbage itself. If you want a realtime-OS, garbage collection will make things much more complicated.<p>Other dynamic featues like multiple dispatch at runtime may also slow down the system and create an unnecessary bottleneck at such a low level.<p>&#62; Why hasn't anyone created a better systemprogramming langauge?<p>Java is a very good systems programming language for Processors that have Java bytecode as machine code.<p>Oberon is a better language to write the Oberon system in than C. There is also a lot of low-level programming going on with Ada. Oberon and Ada are both derived from Pascal and seem very un-dynamic to me. Depending on your definition of better, they may be better sytem programming languages.
brianobush超过 16 年前
There is the D programming language, but it hasn't caught on. <a href="http://www.digitalmars.com/d/index.html" rel="nofollow">http://www.digitalmars.com/d/index.html</a>
wmf超过 16 年前
Legacy, of course. Beyond that I would look to the language semantics, not performance.