3 ms·
Im a bit surprised that this (very C++ biased) post gets such traction on hacker news. Isn't this a solved problem viz moving side effects like IO (getting the
by theK 3y ago
Im a bit surprised that this (very C++ biased) post gets such traction on hacker news.
Isn't this a solved problem viz moving side effects like IO (getting the time) out of the logic parts and just unit/property testing those? Am I missing something here?
EDIT: added last sentence
- mrkeen 3y ago> Isn't this a solved problem viz moving side effects like IO (getting the time) out of the logic parts and just unit/property testing those? Yep, and it delivers even more than what was asked, because now you can test "code that depends on X", not just time. Why it hasn't gained much traction is the camp of coders who will "want to make it simpler" by removing such indirection and making the code ask for the time directly.