CShell icon indicating copy to clipboard operation
CShell copied to clipboard

Printers

Open scenapp opened this issue 8 years ago • 0 comments

[Suggestion] When valuating code, nothing is print to the console. Rather each variable must be explicitly required for printing which is extremely time consuming to see intermediary results. Most REPL do have this print functionality. By default it would be useful to print any new variable added to the global namespace upon evaluation. Example:

var a = 1; var b = 2; var c = a*b; var d = a + c;

// to see c

c 2 d 3

Would be nice if it prints:

var a = 1; {"a", int, 1} var b = 2; {"b, int 2} var c = a*b; var d = a + c;

etc

Likewise if one evaluates everyting in one go, something like {[a, 1], [b, 2], [c, 2], [d, 3]}

Right now, one can do: new Dictionary<string, object>(){{"a", a}, {"b", b}, {"c", c}, {"d", d}};

In FSI:

let a = 1;;

val a : int = 1

let b = 2;;

val b : int = 2

let c = a*b;;

val c : int = 2

let d = a + c;;

val d : int = 3

Or, if evaluated in one go:

val a : int = 1 val b : int = 2 val c : int = 2 val d : int = 3

scenapp avatar Apr 09 '16 09:04 scenapp