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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

C Is the Greenest Programming Language

39 点作者 aberoham超过 3 年前

7 条评论

wheelerof4te超过 3 年前
C is also one of the hardest languages to master. It is dead simple to learn, but also hard to use the language to do any complex thing <i>on time</i>.<p>Should we factor in the additional energy and time of running the developer&#x27;s machine just to implement some basic features built-in in languages such as Python?<p>I love writing C don&#x27;t get me wrong. But it is a tricky language for modern software development, and a very big security liability.
评论 #29264959 未加载
评论 #29264486 未加载
mikewarot超过 3 年前
Free Pascal&#x2F;Lazarus is also near the top of that list, and it lacks a bunch of constructs that make handy footguns.<p><pre><code> It doesn&#x27;t do macros. It doesn&#x27;t have all the .H files. It doesn&#x27;t default to null terminated strings </code></pre> It also has a lot of nice features<p><pre><code> Begin&#x2F;End make it easy to see blocks It has clear syntax for dealing with pointers. @P is the address of P, P^ is what the pointer P points to It makes it easy to tell assignment := from equality tests = It defaults to passing function parameters by value, but can also pass by reference, or pointer. It does separate compilation (units) Strings are memory managed for you, counted, and can even have nulls in them. Identifiers aren&#x27;t case sensitive. It now supports for .. each in loops </code></pre> You can even participate in the Google Kickstart rounds in free pascal to hone your skills.
评论 #29267691 未加载
GoblinSlayer超过 3 年前
There are lies, utter lies and benchmarks.
评论 #29265446 未加载
评论 #29264564 未加载
bmitc超过 3 年前
I don&#x27;t see any mention of Forth there.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=0PclgBd6_Zs" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=0PclgBd6_Zs</a>
em3rgent0rdr超过 3 年前
hackaday links to <a href="https:&#x2F;&#x2F;greenlab.di.uminho.pt&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;10&#x2F;sleFinal.pdf" rel="nofollow">https:&#x2F;&#x2F;greenlab.di.uminho.pt&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;10&#x2F;sle...</a><p>Seems there is an updated paper by same author: <a href="https:&#x2F;&#x2F;haslab.github.io&#x2F;SAFER&#x2F;scp21.pdf" rel="nofollow">https:&#x2F;&#x2F;haslab.github.io&#x2F;SAFER&#x2F;scp21.pdf</a><p>And results table: <a href="https:&#x2F;&#x2F;sites.google.com&#x2F;view&#x2F;energy-efficiency-languages&#x2F;results" rel="nofollow">https:&#x2F;&#x2F;sites.google.com&#x2F;view&#x2F;energy-efficiency-languages&#x2F;re...</a><p>And results charts: <a href="https:&#x2F;&#x2F;sites.google.com&#x2F;view&#x2F;energy-efficiency-languages&#x2F;updated-functional-results-2020" rel="nofollow">https:&#x2F;&#x2F;sites.google.com&#x2F;view&#x2F;energy-efficiency-languages&#x2F;up...</a>
chunkyguy超过 3 年前
Shouldn&#x27;t the energy labels also account for build times? Surprising to see Rust and C++ occupying top positions, even though they&#x27;re notorious for slow build times.
评论 #29264490 未加载
评论 #29269314 未加载
butterisgood超过 3 年前
It helps that hardware vendors attempt to make their platforms run like a PDP...<p>C and hardware are a bit of a cyclic match of dependencies.<p>It doesn&#x27;t have to stay this way, but it probably will.