Re:How Microsoft rewrote its C# compiler in C# and made it o...
by fultonfaknem42 on Tuesday February 11, 2020 @01:33PM
(#22301127)
I think ignorance is a pretty powerful argument to be made by any developer wanting to use Roslyn. The last few times I messed with it there was literally no documentation and everything I knew/know comes from reading headers, trial and error, and experimentation.
I feel defensive about calling it cumbersome though, and I can't imagine why something like your LUA vision isn't possible (though, I've never tried I just assumed someone would inevitably do this). For example, if World of Warcraft were to switch out their UI LUA extension system with C# I could totally imagine this being possible (though it'd be suicidal for their mod community). Likewise, if Unity were to begin using it for this kind of thing (if they don't already) I'd imagine it is possible.
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by jmarolf on Friday February 14, 2020 @02:29PM
(#22329493)
We have some documentation now: https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/
would really appreciate bugs/comments on these docs pages of what else you would like to see.
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by rafaelvasco on Tuesday February 11, 2020 @01:39PM
(#22301221)
Well, it's not cumbersome at all. The problem is really lack of real documentation and most importantly real world examples; About the performance, if you use the real scripting support for Roslyn , yeah, I think you'll have bad performance. But if you compile the code to memory at runtime and execute it like I did, it's pretty fast;
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by eropple on Tuesday February 11, 2020 @03:18PM
(#22302345)
FWIW, I wrote effectively what you describe pre-Roslyn, using the old CSharpCompiler, and it was plenty fast enough for my own developer tolerances. I ended up going to a compile-on-startup mode instead, though.
It's entirely possible that I just don't know what I'm doing well enough to do this correctly, but I just couldn't get it to do the kinds of things that I wanted from it. My sense is that it is really great for injecting custom code that is used rather infrequently. I've had good results using it for building out reporting systems that are pluggable.