News for hackers. Stuff that matters.
Re:Ooc – a small programming language that compiles to C99 by zaius on Saturday January 09, 2016 @01:55AM (#10870387)
This is a really interesting idea. I'm surprised this is the first language I've heard of that targets C. C's major strength is portability, but that means change is slow. When browsers stagnated, coffeescript filled the void, which in turn influenced new versions of javascript.

A certain subset of C++ seems to solve a lot of peoples' problems with C, but it also seems there's no consensus on what that subset is. So people stick with C because at least the rules are defined. Compile-to-C languages like this could have all the benefit of switching to C++ without the downsides

Re:Ooc – a small programming language that compiles to C99 by chipsy on Saturday January 09, 2016 @02:27AM (#10870440)
I'm feeling a lot more interested in OOC now than the last time I looked, not because the language changed but because I did.

I've tried everything else that's popular in the domain at this point and overwhelmingly, the problem is that new systems languages are too big, too incompatible with the existing ecosystem, or too immature in their tooling. They are usable, and many of their cares and concerns are justifiable, but they're overwhelming in a lot of ways. The compilers do so much, and they break, they have weird error messages, or do surprising things with their advanced features. They're mainly built by people who want to make great compiler technology - and they have that, but that doesn't necessarily lead to a smooth development experience on my end.

Most of those issues are sidestepped with a smaller language that just encodes a bunch of common idioms, which OOC does. There are other viable "compile to C" languages out there, of course, but I'm getting more interested in this one.

Edit: And yeah, this is the Go argument. But Go doesn't want to be C-like, really.

Re:Ooc – a small programming language that compiles to C99 by jrapdx3 on Saturday January 09, 2016 @02:15AM (#10870416)
Not a new idea at all, many compilers for different languages output C as one option anyway[0].

Among languages I've enjoyed using and achieving high productivity is CHICKEN Scheme[1]. The compiler defaults to emitting C, though usually the C code is immediately compiled into binary object or executable form. CHICKEN also integrates very well with C as embedded in a C application, using C libraries or writing C directly in "foreign-lambda*" expressions.

[0] http://stackoverflow.com/questions/6498850/programming-langu... [1] http://call-cc.org

Re:Ooc – a small programming language that compiles to C99 by agumonkey on Saturday January 09, 2016 @08:17AM (#10871136)
Since you mention CHICKEN, the "Lisp in small pieces" book although describe such a procedure.
Re:Ooc – a small programming language that compiles to C99 by ziotom78 on Saturday January 09, 2016 @02:11AM (#10870409)
It is indeed an interesting idea. However, it is hardly the first to do this. The first C++ compiler (cfront) did so [1], and there are other languages that follow this idea still today [2][3].

[1] https://en.wikipedia.org/wiki/Cfront [2] http://chapel.cray.com/ [3] http://nim-lang.org/

Re:Ooc – a small programming language that compiles to C99 by Gracana on Saturday January 09, 2016 @03:11AM (#10870511)
Vala is another example of such a language. It generates C and uses GObject under the hood.

https://wiki.gnome.org/Projects/Vala

Re:Ooc – a small programming language that compiles to C99 by Cyph0n on Saturday January 09, 2016 @04:20AM (#10870620)
Nim is one relatively popular language that compiles down to C [1]. Jonathan Blow's upcoming language Jai is another one.

[1]: http://nim-lang.org