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.

Carbon: high level programming language that compiles to plain C

48 pointsby flexterraover 12 years ago

10 comments

shadowmintover 12 years ago
I wish projects like this wouldn't force you to install their libraries in order to play with them.<p>Sure, it's just /usr/local, but @#$#@$@# it's annoying when you have to make install on the dependent library before the core application will install.<p>Use scons. or a makefile. or cmake. Or build a static binary. I don't care; but look at the go source archive for an example of how to do this right.<p>This isn't a good first touch of a project:<p>./configure: line 12296: syntax error near unexpected token `CO2,' ./configure: line 12296: `PKG_CHECK_MODULES(CO2, libco2-1.0 &#62;= 0.1.2,,as_fn_error $? "required module missing" "$LINENO" 5)'<p>hint: you'll notice autoconf isn't in the list above. :P
评论 #4678632 未加载
jryan49over 12 years ago
Reminds me of <a href="https://live.gnome.org/Vala" rel="nofollow">https://live.gnome.org/Vala</a>
nnqover 12 years ago
When the first thing I read about a language it on it's description page is "compiles to X" or "runs on Y", this is definitely a sign that the language ha NOTHING INTERESTING TO OFFER whatsoever. Adding insult to injury, underneath is a bulletted list of language features that any language worth it's salt has them! And please... "Named constructors"... WTF?!<p>(If someone wants to be mean, he could simply compare this feature-wise with one of the Scheme dialects that compile to C...)
评论 #4677227 未加载
Ogreover 12 years ago
The Example link contains, I think, only two things that aren't valid C++. "self." (could be replaced by this-&#62; or simply nothing in C++) and the ["stdio.h"] int printf... syntax for including just one thing.<p>Two and a half things I guess: the methods of MyObject are accessed by main but not declared public (C++ is private by default)<p>I don't know if that's good or bad, but it's not very compelling to me.
jedbrownover 12 years ago
Without a source-level debugger, I see little advantage relative to COS, which <i>is</i> C, but has a more advanced object and type system than Carbon. <a href="http://news.ycombinator.com/item?id=1192791" rel="nofollow">http://news.ycombinator.com/item?id=1192791</a> <a href="https://github.com/CObjectSystem/COS" rel="nofollow">https://github.com/CObjectSystem/COS</a>
评论 #4677237 未加载
bclover 12 years ago
This is going to need better documentation than a Yacc description if it is going to catch on.
评论 #4677673 未加载
michaelfeathersover 12 years ago
It's odd to see compilation to C as a main selling point.
评论 #4677110 未加载
评论 #4676944 未加载
评论 #4677013 未加载
FraaJadover 12 years ago
While not discouraging the original author, Vala from Gnome has taken this thinking a lot further. Vala is actually quite fun to use even for non-GUI projects. And it doesn't have to depend on GTK libraries to produce working programs.<p><a href="https://live.gnome.org/Vala/Documentation" rel="nofollow">https://live.gnome.org/Vala/Documentation</a>
daenneyover 12 years ago
This is going to be rather confusing, I actually thought someone accidentally reinvented Carbon, <a href="https://developer.apple.com/carbon/" rel="nofollow">https://developer.apple.com/carbon/</a>.<p>I realise Apple's Carbon doesn't compile to C but my brain's transderivational search just ignored that fact.
评论 #4676893 未加载
评论 #4676939 未加载
评论 #4677193 未加载
WalterBrightover 12 years ago
Compiling to C puts some significant constraints on your language. For example, C doesn't have COMDAT support, thread local storage, exception handling is limited to setjmp/longjmp, static uplevel function links are a problem, symbolic debug info is going to all look like C, etc.
评论 #4678345 未加载
评论 #4678215 未加载