paint-brush
Type Identity and its Impact on API Designby@nishray
107 reads

Type Identity and its Impact on API Design

by Nishray3mDecember 24th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Type Identity and its Impact on API Design is easy to use public types that denote resource identity to allow actions on a resource. As an example in the snippet below, we use Int to denote the identifier of the Storable type that the user of the interface wants to use to retrieve the value. At first, this does not appear to be a problem, all we need to do is to make an edit to the interface to indicate that we will return an optional value in case the identifier does not exist. But the user may accidentally end up using a random variable of Int type, which has nothing to do with the StoredCollection.

Company Mentioned

Mention Thumbnail
featured image - Type Identity and its Impact on API Design
Nishray HackerNoon profile picture
Nishray

Nishray

@nishray

Nishray

About @nishray
LEARN MORE ABOUT @NISHRAY'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Nishray HackerNoon profile picture
Nishray@nishray
Nishray

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Cbinsights
Techosmo
Startupnchill
Tipsloves
Blogspot
Anonymousmedia