this post was submitted on 31 Jan 2026
220 points (99.1% liked)

Programmer Humor

29100 readers
815 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] harrowhawk@lemmy.sdf.org 3 points 2 days ago

I like this rule of thumb and it goes nicely with the “if you have more than 3 arguments to a function, consider making a struct to pass the arguments in” rule of thumb because

You can have the struct use a named lifetime (or several) for the different parameters so it doesn’t own them!

Best of both worlds.