Closed
Description
PowerShell works, but it's slow and the type system is very limited and can be challenging to work with compared to C#. For instance, parsing JSON into types for intellisense and sharing types between script files does not work very well in Visual Studio, VS Code or Rider.
This issue is just to have a place to dump ideas for improving the code generator, we will only make the jump if it makes considerable improvements over PowerShell.
Geco
Simple code generator based on a console project, running on .Net core and using C# interpolated strings.
https://github.com/iQuarc/Geco
Pros:
- It's C# - familiar and works with normal tooling
- Specifically made with code generation in mind
- Similar to T4 templates but supports debugging
ScriptCS (out of favor due to poor tooling support)
Write C# apps with a text editor, nuget and the power of Roslyn!
https://github.com/scriptcs/scriptcs
Pros:
- It's C# - familiar and works with normal tooling
- Run C#
.csx
files without any projects - Entire C# and .NET at your disposal
Cons:
- Poor tooling support, intellisense and refactoring does not work well or at all
- Requires installing
ScriptCS
on developer PCs - Not built-in way to emit generated text/code, but this could be as simple as
StringBuilder
andFile.WriteAllText