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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of types

types

Photo of Afraid

Afraid

Related news:

News photo

Who's Afraid of Tom Wolfe?

News photo

Here are the types of AI companies enterprise VCs want to back in 2025

News photo

Types are a basic tool of software design (2018)