Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
C−−: a portable assembly language designed by Simon Peyton Jones et al. (cminusminus.org)
30 points by tillulen on Oct 4, 2009 | hide | past | favorite | 9 comments



http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/HighLev...

Another attempt at a "portable high level assembly language". It's being developed by Randall Hyde author of "the Art of Assembly Language". It supports the ia32 architecture (64 bit support is coming in the future) and you can write applications using pure assembly language mnemonics or mix these instructions with high level control structures, high level data types (has support for OOP). It also includes a standard library with functions for concurrency, network programming, pattern matching etc. It's a really interesting project. It's both more low level and high level than C at the same time!


I couldn't find any example code until I downloaded the PDF specification and scrolled to page 7. This seems like very interesting research, but as a hacker: show me the code! There should be a taste of it either on the front page or on a page clearly labeled "examples".


Same thing happened to me. It looks very well put together but it won't get anyone excited as long as they try to get everyone to fall asleep on the homepage.


How does this compare to LLVM?


C-- is used in GHC over LLVM because it (last I heard) supports tail call optimization better than LLVM does.

http://www.haskell.org/pipermail/glasgow-haskell-users/2006-...

http://www.haskell.org/pipermail/glasgow-haskell-users/2006-...

Those are rather old, though, and LLVM has changed (and improved) a lot since then. I'd also figure that LLVM supports JIT compilation much better than C--, which may not support it at all.


It is similar, but LLVM can be higher-level (reusable components; linkages, debugger, etc.) and can have a runtime component (the JIT, etc.).

Note that the C-- paper is from 2005. LLVM did not really get underway until around that time.


It looks like there are also points where C-- is higher-level than LLVM. As far as I can tell, C-- does not require code to be in SSA form, which LLVM does.


Yeah, good point. So I think the best answer to the original question is "they are similar conceptually, but differ in certain ways".


Because there is no mention of the license under which C-- is distributed (on the FAQ page it says "C-- is open source", that's it), there is no actual LICENSE file in the root directory of the source, but in the lua subdirectory there is this item:

"COPYRIGHT

The code, like the rest of Quick C--, is in the public domain."

In the README.ALONE file.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: