Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
REPL output should be less confusing #10024
The current REPL output for definitions is very confusing because it is almost, but not quite valid Scala and also inconsistent.
scala> case class Foo() defined class Foo
scala> trait Bar defined trait Bar
scala> type Qux = Nothing defined type alias Qux
scala> val a = 1 a: Int = 1
scala> var b = 1 b: Int = 1
The Scala REPL's response should be more consistent reporting about definitions.
This and related REPL display issues might be good first issue if they were defined clearly on what are expected at the end.
For example, this issue says "no output in the success case (as does the Python REPL)" as possible solution while #7960 says it would be better to include
scala> var x = 5 var x: Int = 5
referenced this issue
Feb 6, 2018
this is all open-ended and open to debate. these tickets were opened by interested individuals with opinions, they aren't the outcome of any process.
if something is easy to tweak you might just go ahead and we can bikeshed it after, if something looks like bunch of work then you might check first whether people think it's a good idea
re: "nothing in the case of a type definition", sounds good to me
re: "keep var and val definitions the same", #7960 (which is now consolidated here) proposes adding