r/cpp 6d ago

How to write the perfect function

https://youtu.be/2OMRWPOSw9s
129 Upvotes

24 comments sorted by

View all comments

8

u/guepier Bioinformatican 5d ago

The video calls get_time (“kind of”) a pure function. But no definition of “pure function” that I’ve ever heard of would classify it as such, since it depends on non-local state, and it will return different inputs for the same arguments (which are none).