Skip to content

Printers #91

Description

@scenapp

[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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions