Skip to content

Instantly share code, notes, and snippets.

@julienetie
Created September 21, 2024 18:52
Show Gist options
  • Select an option

  • Save julienetie/3dc0ab023a20bb1154d441f7772fc663 to your computer and use it in GitHub Desktop.

Select an option

Save julienetie/3dc0ab023a20bb1154d441f7772fc663 to your computer and use it in GitHub Desktop.
Structs PL comparison
Language Inheritance Encapsulation Polymorphism Constructors Static Members Multiple Inheritance Method Overriding Method Overloading
C struct ❌ ✅ ❌ ❌ ✅ ❌ ❌ ❌
C++ struct ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
C# struct ❌ ✅ ❌ ✅ ✅ ❌ ❌ ✅
Swift struct ❌ ✅ ❌ ✅ ✅ ❌ ❌ ✅
Zig struct ❌ ✅ ❌ ❌ ✅ ❌ ❌ ❌
Rust struct ❌ ✅ ❌ ✅ ✅ ❌ ❌ ❌
Go struct ❌ ✅ ❌ ❌ ❌ ❌ ❌ ❌
Odin struct ❌ ✅ ❌ ❌ ✅ ❌ ❌ ✅
D struct ❌ ✅ ❌ ✅ ✅ ❌ ❌ ✅
V struct ❌ ✅ ❌ ❌ ✅ ❌ ❌ ❌
Nim struct ❌ ✅ ❌ ✅ ✅ ❌ ❌ ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment