DEV Community

Discussion on: ELI5: What is an API?

Collapse
 
argustic1 profile image
Argustic

Thank you for making this simple and well written read. I like to be certain what I’m talking about when I use terms and I feel like API gets used very very loosely. I like simple definitions that are easy to remember, so replacing API with “someone else’s code” works great.

Question: What would you say is the difference between an API and a library? I’m speaking from my old C programming days where you would start most your code off with ‘include’ statements. They essentially sound like API’s specific to C

Collapse
 
awwsmm profile image
Andrew (he/him)

You can think of the API as the "surface area" of the library. There may be lots of good stuff inside, but you can't access it without going through the predefined public API.