These are chat archives for dthree/wat

6th
Nov 2015
dc
@dthree
Nov 06 2015 05:50
An API is simply a listing of all of the public commands the library exposes.
For an analogy, the dashboard of a car, with its wheel, radio, and gauges, could be considered the API of a car.
A lot more is going on under the hood, but you don't need to know those things. The data you need and the controls you need are publicly exposed to you in the front seat.
An API is the same thing, except for a library or language.
Here's an API example for vorpal, the library wat is built on:
Those are all of the public commands for controlling the CLI.

This would be a good example of a page wat would load. Wat can figure out which of those things listed are properties, and which are methods, and breaks it up as such.

Does this make some sense?
Noah
@naltun
Nov 06 2015 11:50
This makes more sense, yeah. Actually, the car analogy is quite good. So the API is sort of like the documentation? It explicitly details the use of the language?
If so, then that makes more much sense.
dc
@dthree
Nov 06 2015 17:22
Yeah - you got it!