Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> An API doesn't implement anything, it describes a function.

Unfortunately, that is also a definition for the whole of programming: describing functions. In Java, the method signature gives only a very incomplete definition, but that is a factor of the programming language itself.

For example, you might wish to imagine a hypothetical language that has a type system so refined that the behaviour of any function is completely described by its type (1). In such a case there would be no difference between its description and its implementation.

(1) We'll leave aside the question of whether this is strictly possible. It would be possible to have more powerful type systems than Java's, and program designs that use such small and clear function definitions, that if you have the type signatures then filling in the code for them is more straightforward than designing the function definitions was in the first place.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: