Hacker News new | ask | show | jobs
by procparam 2091 days ago
Can you say more about how you use eval() during prototyping?
1 comments

It can be nice when you're working running code in a repl and don't want to maintain state/code between repl sessions. If you just print the data to stdout, you can just eval it and not have to deal with writing one-off cacheing. It's similar to the use case of pdb where you're forcing yourself into the middle of ten different functions. But print statements are easily added, easily removed, and so is eval.