As an extension to this, strong typing is a gateway drug to generics.
Strong typing really shines when you have generics, saving bugs at one level above basic types..
Strong typing really shines when you have generics, saving bugs at one level above basic types..
I like the idea, feels very pythonic ironically. And I suppose if you don't want the generic, I imagine there is probably some subclass of that which is more restrictive.
Anyway, as a developer I love when people do this. As a developer this sounds like a nightmare to maintain. My coworkers have told me to limit the numbers of 'what ifs' and just roll with it.
Granted it's not always easy and straight forward but that what senior developers in the team are for..
https://docs.swift.org/swift-book/documentation/the-swift-pr...
Look at duck typing.