238
you are viewing a single comment's thread
view the rest of the comments
[-] harrowhawk@lemmy.sdf.org 5 points 1 day 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.

this post was submitted on 31 Jan 2026
238 points (98.8% liked)

Programmer Humor

29083 readers
1205 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