Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printers #91

Open
scenapp opened this issue Apr 9, 2016 · 0 comments
Open

Printers #91

scenapp opened this issue Apr 9, 2016 · 0 comments

Comments

@scenapp
Copy link

scenapp commented Apr 9, 2016

[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant