←back to thread

409 points Bogdanp | 2 comments | | HN request time: 0.404s | source
Show context
Paracompact ◴[] No.45535991[source]
Radical opinion: If the technical spec of a method cannot be intuited from the signature and a handful of canonical examples of usage, the method is probably trying to do too many things.

In particular, I don't want to have to learn half a dozen footguns because of a leaky abstraction.

replies(2): >>45536189 #>>45544372 #
1. joemi ◴[] No.45544372[source]
Why rely on someone to intuit what you could just simply state explicitly? That sounds like you're just asking for trouble if someone doesn't think/intuit in exactly the same way that you do.
replies(1): >>45547246 #
2. Paracompact ◴[] No.45547246[source]
Including the technical spec explicitly is still a good idea. Examples without a word of summary would just be strange!

It's merely that I think unstructured English is not a good language for communicating knowledge of how to use an API.