News for hackers. Stuff that matters.
Re:Otterkit COBOL, a new free and open source COBOL compiler... by Semaphor on Tuesday January 17, 2023 @11:02AM (#34414133)
> Why not directly compile to CIL?

This was asked and answered on reddit [0]:

> Exactly, there's no way that we could optimize the IL better than the dotnet compiler, so we chose to emit C# text and let the dotnet compiler do the optimization for us.

> This also makes it a lot simpler to generate code, without having to deal with the lower level IL.

[0]: https://old.reddit.com/r/csharp/comments/1074jdj/otterkit_a_...

Re:Otterkit COBOL, a new free and open source COBOL compiler... by garganzol on Tuesday January 17, 2023 @11:22AM (#34414425)
JFYI, optimizations performed by C# compiler are not that great. They are present but their extent is pretty limited.

Actually I like it better when COBOL gets transpiled to C# and not IL but for another reason. COBOL -> C# pathway allows migration to something a bit more modern than COBOL itself. This may be crucial for some projects.