Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isensee-bastian/set-interface
Tutorial code for my video Generics Part 2: Using the empty Interface instead
https://github.com/isensee-bastian/set-interface
basic-programming beginner-tutorial-series code-reuse data-structures generics golang interface learn-to-code maps sets switch-case tutorial type-assertions youtube
Last synced: 9 days ago
JSON representation
Tutorial code for my video Generics Part 2: Using the empty Interface instead
- Host: GitHub
- URL: https://github.com/isensee-bastian/set-interface
- Owner: isensee-bastian
- License: mit
- Created: 2022-04-15T15:02:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-15T15:05:01.000Z (over 2 years ago)
- Last Synced: 2024-06-21T06:32:57.547Z (5 months ago)
- Topics: basic-programming, beginner-tutorial-series, code-reuse, data-structures, generics, golang, interface, learn-to-code, maps, sets, switch-case, tutorial, type-assertions, youtube
- Language: Go
- Homepage: https://youtu.be/ASUf380d974
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generics Part 2: Set Implementation with empty interface
* Why generalize our set implementation
* Allows code reuse with other element types
* Using the empty interface type
* No restrictions, satisfied by every specifc type
* Allows code reuse
* Common solution before Go 1.18
* Element types can be mixed (often not wanted)
* No guarantees by the compiler, requires type assertions at runtime