My new article is out! It is all about typeclasses in Python a | Opensource Findings
My new article is out! It is all about typeclasses in Python and dry-python/classes.
Today I am explaining what typeclasses are and how to use them. I give examples in 4 very different languages: #rust, #elixir, #haskell, and #python to show that this concept is universal.
I am also showing that this idea is very pythonic by comparing our classes implementation with functools.singledispatch. There are lots of different details!
Check how easy it is to define a typeclass with classes:
from classes import AssociatedType, Supports, typeclass
class Greet(AssociatedType): """Special type to represent that some instance can `greet`."""
Links and concise reviews on open-source tools, news, and talks about language-design, trends and fundamentals. Write-only. If you like this project, you can sponsor it directly: https://github.com/sp...