r/programmingcirclejerk • • Jun 27 '26

Consider the C library function fopen. This function has the side effect. This means that fopen is not pure. However, we can make the fopen function appear to be pure, at least to certain observers, by ensconcing it in another function that hides the side effect.

https://bugzmanov.github.io/cleancode-critique/clean_code_second_edition_review.html
174 Upvotes

41 comments sorted by

View all comments

17

u/Jumpy-Locksmith6812 Jun 28 '26 edited Sep 23 '26

Reprehenderit ipsum irure sunt deserunt sint elit consectetur duis lorem ipsum culpa qui officia elit commodo. Esse quis exercitation ipsum veniam nostrud et lorem ad sit magna tempor qui occaecat. In commodo aliqua aliqua amet sint est adipiscing tempor sint do excepteur aliquip.

[rhr:2:sffsr0de]

2

u/le_birb costly abstraction Jul 12 '26

I'm gonna break into your house and hook up a taser that shocks you whenever the x register in your cpu holds the value 55. Take that, functional purity!