You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a "catch-all" issue to discuss adding printout prefixes in some examples to make the code easier to correlate to output.
gobyexample has a number of examples that produce many printouts, and it's sometimes difficult to correlate them to the output pane at the bottom (which printout produced which output?)
Some issues and PRs were raised over time to address this, but it isn't a trivial problem to solve. Fixes like #391 worked out well because the specific example has short lines in printouts, and adding the prefixes aligned well with the existing Printf calls. Other examples, like #288 are much trickier because we're limited by line length and the regex example is already pushing the maximal line length in many cases, with no prefixes.
Generally it's a tradeoff between code readability and the correlation of output to printouts. We could add a separate fmt.Println("prefix:") before each example, but this would inflate the code side and make the examples generally harder to read.
The text was updated successfully, but these errors were encountered:
This is a "catch-all" issue to discuss adding printout prefixes in some examples to make the code easier to correlate to output.
gobyexample has a number of examples that produce many printouts, and it's sometimes difficult to correlate them to the output pane at the bottom (which printout produced which output?)
Some issues and PRs were raised over time to address this, but it isn't a trivial problem to solve. Fixes like #391 worked out well because the specific example has short lines in printouts, and adding the prefixes aligned well with the existing
Printf
calls. Other examples, like #288 are much trickier because we're limited by line length and the regex example is already pushing the maximal line length in many cases, with no prefixes.Generally it's a tradeoff between code readability and the correlation of output to printouts. We could add a separate
fmt.Println("prefix:")
before each example, but this would inflate the code side and make the examples generally harder to read.The text was updated successfully, but these errors were encountered: