dotnet-script
dotnet-script copied to clipboard
Suggestion: provide an `eval` option for implicit expression output, as in the REPL
The implicit output of expression results in the REPL is a great feature that obviates the need for Console.WriteLine() (and even does a better job at creating meaningful output than straight .ToString() stringification).
Especially for presumably typically short code passed to dotnet-script eval, it would be handy to have automatic result printing as well, so that instead of:
dotnet-script eval "Console.WriteLine(1+2)"
you could simply write something like:
dotnet-script eval "1+2" -p
and have 3 automatically printed.