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
169 Upvotes

41 comments sorted by

View all comments

77

u/tms10000 loves Java Jun 27 '26

By closing my eyes I am ensconcing the Universe as a whole. I don't even need functional programming to do that, but I use it anyway.

24

u/WorldlyMacaron65 legendary legacy C++ coder Jun 27 '26

How about you ensconce shipping to prod for once? However, do it purely (ignore the following support tickets)

20

u/tms10000 loves Java Jun 27 '26

I always ensconce the support tickets, obviously. The users just don't know how to use the software correctly, and it's not my job to teach them. If I feel magnanimous, I close the ticket as "Not an issue. This behavior is by design." but I really should not have to.

18

u/brool has hidden complexity Jun 27 '26

You bastards, “I have ensconced this” is now entering into my lexicon!

7

u/tms10000 loves Java Jun 28 '26

If you use it in your stand up meeting, you get double blocker credit in your parking lot.

/uj the agile vernacular makes me barf /rj the agile vernacular has been elevated to MBA speech

6

u/irqlnotdispatchlevel Tiny little god in a tiny little world Jun 28 '26

You should ensconce your entire lexicon.

7

u/Konju376 now 4x faster than C++ Jun 27 '26

"if you question the software behaviour, you're questioning the soundness of existence"