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.

C Is the Greenest Programming Language

39 pointsby aberohamover 3 years ago

7 comments

wheelerof4teover 3 years ago
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 未加载
mikewarotover 3 years ago
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 未加载
GoblinSlayerover 3 years ago
There are lies, utter lies and benchmarks.
评论 #29265446 未加载
评论 #29264564 未加载
bmitcover 3 years ago
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>
em3rgent0rdrover 3 years ago
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>
chunkyguyover 3 years ago
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 未加载
butterisgoodover 3 years ago
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.