Get the latest tech news

Types as Interfaces


For the past few days, I have been toying with an idea for a board game. To test it out, I wanted to write a simple implementation of it.

In that phase, values of this type need to be communicated back and forth between players in a unicast fashion, so we might want to add fields to indicate who sent it and who received it. Image data might be stored in a tga file with headers giving information on how to interpret it. does a switch hold up an ethernet frame to the light and ask, “So what http content type are you transmitting?” We have designed these protocols to be layered with meaningful structure from outside to in.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of types

types

Photo of interfaces

interfaces

Related news:

News photo

The Smart Principles: Designing Interfaces That LLMs Understand

News photo

Atash Behram – Types of Fire

News photo

Show HN: Sum (algebraic) types for C in one 100 line header