|
|
|
|
|
by Daishiman
2049 days ago
|
|
Not true. In Python and Ruby it's an extremely common pattern to return a dictionary with a half-dozen entries at most that will be consumed at a single location. Defining an entire class for this sort of extremely common use case is for the most part a waste of time. These languages allow for the formalization of those types by creating classes out of them, but looking at what 50% of my functions do in web dev code, they're returning tuples, small dictionaries, or standard library objects. |
|
Maybe you can give a minimal code example of what you mean and I'll show you how I would solve that in a statically typed way. :)