Skip to content

Commit e4c7083

Browse files
committed
DevJournal
1 parent ed5507d commit e4c7083

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

DevJournal.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# About
2+
3+
This project is my hobby project to get familar with Roslyn.
4+
5+
# True intention
6+
7+
This is a note for a stranger, who as me, is looking for the answer how to translate his C# code to C++ (or vice-versa), I have bad and good news for you.
8+
9+
Bad: in general it is a bad idea, sometimes very bad, most of companies offer AOT, not translators. But what I also realize, it could be very good if you know exactly how your transpiler works.
10+
11+
Good: if you want to translate code from one programming language to another on a daily basis, then what you exactly want is a new language (or existing one, e.g., [Ć](http://cito.sourceforge.net)). Think of it as C# and C++ are very different languages, a main difference is GC, you cann't translate freely from one code to another, but if you have a new language (subset of both) you can translate with ease.

Library/CppLang/SourceCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static public void AppendEx(this StringBuilder builder, YStatement statement)
139139
builder.Append(")");
140140
AppendEx(builder, @if.Statement);
141141
if (@if.ElseStatement != null) {
142-
builder.Append("else");
142+
builder.Append(" else ");
143143
AppendEx(builder, @if.ElseStatement);
144144
}
145145
}

0 commit comments

Comments
 (0)