domenica 27 novembre 2011 23:03
Congratulations on the Roslyn release - this is a very promising technology. I'm particularly interested in using C# as a scripting language for some tools we're developing. A couple of things would make this considerably simpler:
1) LINQ support. I understand this isn't in the current release so hoping for it to be exposed down the line. (One of the tools we're working on is similar in concept to Wireshark and LINQ provides a very natural syntax for filtering nested data.)
2) Have you considered providing a WPF/WinForms 'C# editor' component which would wrap up syntax colouring and 'standard' intellisense for use in other tools ? I realise that defining such a thing is tricky - you don't want to replicate half of the functionality of Visual Studio! What I have in mind though is something that could act well enough to facilitate composing simple scripts. Clearly it's possible to use a richtextbox for input but this feels rather dissatisfying after a 'proper' environment like VS.
Tutte le risposte
lunedì 28 novembre 2011 20:58Proprietario
Hi, nmacmull. Thanks for your scripting interest! Yes, we will be adding LINQ support in that the entire C# language or anything you can execute in the REPL will be able to execute via the Roslyn Scripting APIs. There are some things you can't do, of course, like Engine.Execute("return 5;"), but these disallowed top-level code features are listed in the spec I posted a link to. Of course, nothing is written in stone right now, but this is what we're working on. LINQ doesn't work in your bits simply due to the language work not having happened in the compiler.
As to the free rehostable REPL component, we have discussed this, but there are no firm plans around this piece. We totally get it would be a nice convenience, but it is a matter of balancing other features for whether we get to this one. Chris Sells just posted a blog about building a cmd.exe REPL based on Roslyn APIs, and he wants to show some completion support in that code. If he finishes that up, it might be a small task to wrap it in a WPF/winforms txt box, and there's your component.
- Contrassegnato come risposta nmacmull martedì 29 novembre 2011 19:15
martedì 29 novembre 2011 19:22
Bill, thanks for the response and I'll look forward to future releases. WRT rehostable C# editor I certainly understand that there's a long list of things to do and a finite number of people to do it but I'll keep my fingers crossed. :-) The pointer to to Chris's blog was useful as well. For anyone else looking for it, it's here.
- Modificato nmacmull martedì 29 novembre 2011 19:22