TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JPL C Coding Standard [pdf]

79 pointsby c0rtexover 9 years ago

9 comments

narsilover 9 years ago
&gt; There shall be no direct or indirect use of recursive function calls.<p>&gt; [The] absence of recursion prevents runaway code, and helps to secure predictable performance for all tasks.<p>I can see the reasoning here, but wow, banning recursion..
评论 #10157529 未加载
评论 #10157404 未加载
alayneover 9 years ago
<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4339999" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4339999</a>
c0rtexover 9 years ago
Here&#x27;s a great video with a bit more background about why you&#x27;d want to adopt such a standard.<p><a href="https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;hotdep12&#x2F;workshop-program&#x2F;presentation&#x2F;holzmann" rel="nofollow">https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;hotdep12&#x2F;workshop-program&#x2F;...</a>
nwmcsweenover 9 years ago
&gt; The goto statement shall not be used...<p>&gt; ...often results in improved code clarity<p>Um not really, if goto is used _right_ it clarifies code immensely.
评论 #10157455 未加载
technionover 9 years ago
&gt;The JPL recommended static analyzers are fast, and produce sparse and accurate messages.<p>I&#x27;m interested in what analyzers they may be recommending. I think this is a field that&#x27;s come a long way since 2009.<p>A lot of these standards could actually be implemented as rules in modern products, which would assist with using them.
评论 #10160115 未加载
dahartover 9 years ago
It&#x27;s lovely reading a coding standards document that is 100% focused on code safety, and has zero stylistic argument.<p>These rules are a good reminder for me, too. A lot of them were habit when I was doing C&#x2F;C++ on game consoles. Using more dynamic scripting languages on machines with more and more memory over the years has helped me forget. But most, if not all, of these rules have valid analogues in any language that can be aspired to.
Nickersfover 9 years ago
Why were parts of the standard omitted? Money, national security, or both?
评论 #10163931 未加载
评论 #10157736 未加载
ilogikover 9 years ago
I was hoping there would be a mention of always using metric units.
pisipisipisiover 9 years ago
Anyone happens to have a link to MISRA-C PDF ? :)
评论 #10163946 未加载
评论 #10157901 未加载