News for hackers. Stuff that matters.
Re:The C-- Language Specification (2005) [pdf] by gnulinux on Tuesday March 19, 2019 @09:39AM (#19430664)
Does compiling to C-- have any benefits compared to compiling equivalent C code (maybe a subset of C)? My guess would be modern C compilers, powered by decades of R&D and programming, would be able to optimize just as well and possibly better.

EDIT: One advantage that comes to my mind is that compiling to C-- will give slightly more power to deal with stack. E.g. implementing exceptions, continuations etc would be simpler. This is possible in C using inline assembly.

Re:The C-- Language Specification (2005) [pdf] by rwhaling on Tuesday March 19, 2019 @12:23PM (#19432329)
One benefit that is repeatedly mentioned in the papers is the ability to do tail-call optimization, which is more or less impossible with compile-to-c interpretations, and mandatory for functional languages.
Re:The C-- Language Specification (2005) [pdf] by ufo on Tuesday March 19, 2019 @10:19AM (#19431004)
Another thing it helps with is garbage collection. If you compile down to C it also requires stack trickery.
Re:The C-- Language Specification (2005) [pdf] by vmchale on Tuesday March 19, 2019 @10:00AM (#19430843)
>My guess would be modern C compilers, powered by decades of R&D and programming, would be able to optimize just as well and possibly better.

GHC often produces more efficient code than the LLVM backend.