Get the latest tech news
Don't Be Afraid of Types
Types in coding projects are good. Don’t be afraid to create them when you need to.
But I’ve found it useful to make types for the lesser bits of information: requests from handlers passed through to the service layer, for instance. There was this feeling in the zeitgeist that types and classes are sacred, and that to create a new one is a privilege bestowed only to the leads, architects, and anyone else that had write access to the UML diagrams. Each type was to be an artefact of design, probably because of how much baggage came from defining a new one: they had to be in a separate file, must have seven different constructors, and the fields must be mediated through the use of getters and setters.
Or read this on Hacker News