Re:Why I love Common Lisp and hate Java (2012)
by akvadrako on Saturday November 03, 2018 @09:31PM
(#18373511)
You use logging for production, but if you just want to see what a value is while when you run your program in the IDE and might not for a logger imported, print is handy.
[ Parent
| on HN ]
Re:Why I love Common Lisp and hate Java (2012)
by all2 on Sunday November 04, 2018 @12:07AM
(#18374149)
Coming from python I like to set a breakpoint, and dive in with pdb. It's super easy to navigate through the stack frame and poke around to see what all the variables are. I get more out of inspecting state from inside of pdb than I do out of print statements.
On the other hand, I tend to use only print statements when I'm roughing in a program in an iPython Notebook. This gives a sort of visual documentation when navigating a library that I'm new to, and allows me to glance back at a verbose description of otherwise opaque data structures.
Re:Why I love Common Lisp and hate Java (2012)
by rpeden on Saturday November 03, 2018 @09:54PM
(#18373605)
If you're running from an IDE and want to inspect values, why not just set a breakpoint?
Re:Why I love Common Lisp and hate Java (2012)
by tormeh on Saturday November 03, 2018 @10:31PM
(#18373749)
Doesn't work with multithreaded applications and works poorly with non-deterministic behavior, so sometimes you just have to print lots of info and see if anything interesting pops up. It also requires knowledge about tooling for the language you're working on right now, which as a polyglot you might not care to learn.
Re:Why I love Common Lisp and hate Java (2012)
by LoSboccacc on Sunday November 04, 2018 @07:05AM
(#18375476)
Nah there's debugging for that