I don't know who in Clojure land decided that (seq coll) was "the right idiom" to test if a seq is non-empty, but I really hate it!
Conversation
Notices
-
Embed this notice
Boosty Collins (ieure@retro.social)'s status on Tuesday, 07-Nov-2023 08:21:59 JST Boosty Collins -
Embed this notice
tech? no! man, see... (technomancy@icosahedron.website)'s status on Tuesday, 07-Nov-2023 08:21:58 JST tech? no! man, see... @ieure it's so bad!
Rich is not your dad; just because he said to do something silly doesn't mean you have to do it
you can write code that reads nicely instead!
-
Embed this notice
tech? no! man, see... (technomancy@icosahedron.website)'s status on Tuesday, 07-Nov-2023 08:54:34 JST tech? no! man, see... @ieure that seems like a completely different problem I guess?
with goto, you trade the ability to do something that is occasionally useful for the guarantee that code flow is predictable, same as how GC trades malloc for the ability to certain classes of bugs never happen
the seq idiom is just bad naming with no trade-off behind it; it's backed by authority and nothing else
-
Embed this notice
Boosty Collins (ieure@retro.social)'s status on Tuesday, 07-Nov-2023 08:54:35 JST Boosty Collins @technomancy So bad.
Thing here is, I've been touching computers long enough that I've transcended the shackles of petty concerns like these. Sometimes, a goto is the best way to express some code, and woe betide the programmer who can't recognize that because they've spent their whole career avoiding the "harmful" tools in their kit.
But when the contractors write stuff like this, and I say "This is unreadable nonsense" their comfortable position of But That's The Idiom cannot be defeated by my enlightened argument that The Idiom Is Horrible And We Are Free.
The fallback position of Whoever Came Up With This Crap Doesn't Work Here, But I Do is generally required. And as that tends to erode one's position of benevolent trustworthiness, I usually have to satisfy myself with the wisdom of knowing it cannot be helped, as I accept it.
-
Embed this notice