Timeline for Should there be print statements in a library
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 30, 2016 at 23:33 | comment | added | Ross Patterson | @ErikEidt Plus, of course, when you use a library, there might not be a destination to print to. | |
| Apr 30, 2016 at 18:59 | vote | accept | Gaurav Kumar | ||
| Apr 30, 2016 at 15:05 | review | Close votes | |||
| May 9, 2016 at 3:02 | |||||
| Apr 30, 2016 at 15:05 | comment | added | Erik Eidt | Printing is a pretty big and unexpected side effect for a function. It's also going to slow things down. There are better ways to test things. It is ok (good even, see @gnat's reference) to log if you allow the choice of logging to be the library user's not the library's, and it includes choices to expand/limit verbosity. | |
| Apr 30, 2016 at 15:04 | answer | added | Philip Kendall | timeline score: 11 | |
| Apr 30, 2016 at 14:47 | comment | added | Gaurav Kumar | Not exactly. Just to print some info. like printing return value before returning it, so that when library is being tested as standalone, its output is visible. | |
| Apr 30, 2016 at 14:46 | comment | added | gnat | Possible duplicate of Should You Log From Library Code? | |
| Apr 30, 2016 at 14:45 | review | First posts | |||
| May 1, 2016 at 23:58 | |||||
| Apr 30, 2016 at 14:45 | comment | added | Erik Eidt | Are the print statements for logging? | |
| Apr 30, 2016 at 14:43 | history | asked | Gaurav Kumar | CC BY-SA 3.0 |