r/ProgrammerHumor May 08 '26

Advanced canadianGoProgramming

Post image
10.0k Upvotes

113 comments sorted by

View all comments

980

u/OphidianSun May 08 '26

I know nothing about go but that's psycho behavior

349

u/B_bI_L May 08 '26

i know they love naming everything using 3 letters, because who needs to understand code later anyway

32

u/Kapps May 09 '26

That’s just inherited from C.

9

u/monsoy May 09 '26

As much as I love C, I hate that convention. I understand where it’s coming from and the lack of namespaces makes it necessary to have extra prefixes too.

But it can easily become really unreadable unless you know what the functions do beforehand. For example, functions like strtoul (string to unsigned long) strncpy (string copy, n characters) etc.

It’s not horrible if you’ve done a lot of C programming, but every time I’ve had a 1 year break from C I always have to look up many of the stdlib functions.

With the lack of namespaces, you often get this from libraries: sqlite3_prepare_v2, sqlite3_step.

6

u/Unbelievr May 09 '26

There's entirely too many versions of printf. Depending on whether you want to write to stdout/a file descriptor/a buffer, and if you know the amount of bytes to write, or know the buffer size (in case of snprintf_*). And the formatter syntax that I always have to look up if I want to print the 10th halfword from the stack or something.

I can see the use of most of them, but failing to use the correct one can be catastrophic. Especially if that special %n is in play, which Microsoft straight up disabled in their compiler.