Hacker Newsnew | past | comments | ask | show | jobs | submit | gjndrtjh's commentslogin

Ć programming language (http://cito.sourceforge.net/) compiles C# subset to C.

The C code generator is very simple: http://sourceforge.net/p/cito/code/ci/master/tree/GenC.cs



>C pretty much runs anywhere, after all. What exactly does this bring to the table?

1. No, C doesn't run everywhere. I can't compile C to Java, C#, JS, AS, Perl and D. Or compile it to any other language (PHP, Objective-C, Pascal, ...) just by writing 500 lines of generator.

Look how huge project Emscripten is: 1 537 390 lines according to Ohloh. But JS generator for Ć is only 457 lines.

2. C# is easier than C. You can write Ć in Visual Studio C#, the best, easiest and fastest IDE in the world.


1. A compiler translates from a higher level language to a lower level language.

2. I disagree. They have the same level of complexity, C# possibly more if you use advanced concepts. And you can write C in Visual Studio...


"ci" or "cito". As in http://cito.sourceforge.net


Alternative names for Ć are "ci" and "cito".


It only has manual memory management. No GC.

But if you don't target C, you can just skip using "delete".


Right, from the documentation (albeit hidden in the Arrays section):

Since there is no garbage collection in C, you must free the dynamically allocated array with delete. delete translates to C as free and nothing in other (garbage-collecting) languages.


I asked the language creator. Float, double, short types are going to be added within 1 month. 64 bit integers are not possible because Javascript doesn't have them.


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

Search: