REPL
like CsharpRepl in mono
-
LINQPad now has a Cache extension method which preserves results between query runs. (Go to Help | What’s New and search for ‘caching’ for an example.) Let me know if you still want REPL.
-
james.manning commented
I'm a little worried that this suggestion isn't getting the traction it deserves because of its brevity. To try and help that a bit, one of the experiences I love is the REPL with PowerShell, where I can fetch objects, view them, filter them, sort them, group them, etc with PowerShell's cmdlets.
The main problem is that often I want/need to use LINQ statements instead, but even if I'm willing to deal with calling the static extension methods manually, I'm still stuck with not having lambda-type support in the PowerShell parser.
Mono's project CsharpRepl (http://www.mono-project.com/CsharpRepl) is indeed a good example of the kind of experience I'd like to see - instead of LINQPad's current behavior of executing the script and then throwing everything away, it could instead keep the context / method / whatever around and after displaying the results, allow the user to execute the next statement(s) in the same context (so the local variables, etc. are all still around in memory).
On the surface of things, it seems like hosting the PowerShell engine (which is very simple, especially with v2) might make this easier for LINQPad, as it wouldn't have to maintain all that shell-like state, and could let PowerShell handle that, just compiling and executing (or having PowerShell's engine execute) the code from the user.
Another alternative would be to try and put a C# REPL on top of / inside of PowerShell, but I think that would be unfortunate since LINQPad already does so much heavy lifting around building/maintaining the data connections, providing a great UI, providing export functionality, etc.