this post was submitted on 10 Feb 2026
285 points (95.5% liked)

Programmer Humor

30403 readers
2388 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
[–] Not_mikey@lemmy.dbzer0.com 1 points 1 month ago (2 children)

I thought it didn't have classes in name only, isn't a struct with methods basically a class?

[–] lime@feddit.nu 2 points 1 month ago

a class can be inherited from, a struct can not.

[–] firelizzard@programming.dev 2 points 1 month ago

Depends on what you mean by “basically a class”. If you mean inheritance, overriding, and more generally class/inheritance based polymorphism, no, it does not. Those require dynamic dispatch, which Go does not have (for concrete types, which is what we’re talking about here).