Fluent polymorphism via duck typing. Itβs useful when youβre treating objects as a collection of properties, and therefore itβs not their type that matters but which properties they have. Types can still be used to label common collections of properties but itβs less painful to talk about objects that are βlike an X but with/without certain properties,β or where some properties themselves have a different shape, etc. This is applicable to web APIs, not just because of JSON, but because it allows to define both very rigid and very flexible schemas without much overhead or repetition. See the OpenAPI specification.
30 points
*
10 points
8 points
7 points
0 points
0 points
2 points
2 points
*
Programmer Humor
!programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
Community stats
3.6K
Monthly active users
1.5K
Posts
35K
Comments