reignstudios / CS2X

Transpiles a C# subset to non .NET languages. (Powered by Roslyn)
MIT License
134 stars 14 forks source link

Great Project #3

Closed atErik closed 4 years ago

atErik commented 4 years ago

Hi,
i like this "CS2X" transpiler project.
its useful.
i have Starred this project.
it needs to be improved further.

Thanks.

EXTRA - INFO : by the way, i have mentioned your project here in SO(StackOverflow) site , would you please UPVOTE it here ( please upvote my Question+Answer, both ) or please vote "Converting/transpiling..." here to Undelete it , if you find it useful or if you think it will be helpful for other users related to this type of transpiler projects . By the way, Transpiler-List can be seen from here or here or find it under my repo(s) here.
( and please downvote user Caleb's answer, as that is incorrect answer . Correct-answer must answer my questions first , My question is about "Transpiler" tools & which "transpiler" tool can keep high-level algorithms/structures intact , Question/article is NOT about language learning, when to transpile & when-not, etc.
In SO site, user Flimzy (and Caleb) doesn't give advice When "C/C++",etc to "Go" conversion related question is posted or when "C/C++" is criticized , But when "Go"-to-"C/C++",etc conversion Question is posted or when Google based products (like "Go"-language) are criticized , then those users, especially Flimzy "Close" the question & downvotes, & gives many un-asked advices, etc, Because those users are Google PUSHERS & google based product (like "Go", Google-Advertisements,etc) PUSHERS . Flimzy edited-out important text from my post criticizing Advertisements . Google Crimes1, 2, 3, 4, 5, 6. Problems in "Go"1, 2, 3, 4, 5, 6, 7. )

EDIT : added links for new Transpiler-List site, added links on "Go"-problems, etc.

zezba9000 commented 4 years ago

C# transpilation/compilation into C89 is simplified because C# has Roslyn (aka compiler as a service). The Nim lang also has this I believe but I don't think most langs do.

Go is fundamentally flawed as a lang for many things anyway as it doesn't support stuff like custom operators etc. While .NET is a flawed runtime in many ways C# as a lang is very capable.

The only approach you should take with the Go lang is: Go-AST => semantic analyzes => transpilation/compilation logic => C/C++ (with a custom runtime).

With CS2X Roslyn takes care of the first two steps but with Go you probably have to manually do everything or its not going to work.