Difference between revisions of "API Design"

Line 18: Line 18:


----
----
A great insight on API and language design comes from Larry Wall, the designer of Perl, but I first heard about it from [http://number-none.com/blow Jon Blow] in [http://number-none.com/product/Lerp,%20Part%201/index.html this article].  You want your language or API to be ''diagonal'', not ''orthogonal'' like people are used to thinking.  If you want to go from one place to another, you want to travel the shortest distance, not have to take the Manhattan path.
A great insight on API and language design comes from Larry Wall, the designer of Perl, but I first heard about it from [http://number-none.com/blow Jon Blow] in [http://number-none.com/product/Lerp,%20Part%201/index.html this article].  You want your language or API to be ''diagonal'', not ''orthogonal'' as conventional programming wisdom states.  If you want to go from one place to another, you want to travel the shortest distance, not have to take the Manhattan path.  It's a great point.


----
----

Revision as of 09:23, 21 January 2007

This is really just a miscellaneous collection of thoughts and links right now, not a full fledged article on API design.


Casey Muratori gave a good talk at Game|Tech on Designing and Evaluating Reusable Components, which was really a talk on API design.

Here's the executive summary:

  • Granularity - A or BC
    Flexibility vs. simplicity
  • Redundancy - A or B
    Convenience vs. orthgonality
  • Coupling - A implies B
    Less is always better
  • Retention - A equals B
    Synchronization vs. automation
  • Flow Control - A invokes B
    More game control is always better

A great insight on API and language design comes from Larry Wall, the designer of Perl, but I first heard about it from Jon Blow in this article. You want your language or API to be diagonal, not orthogonal as conventional programming wisdom states. If you want to go from one place to another, you want to travel the shortest distance, not have to take the Manhattan path. It's a great point.


This page was last edited on 21 January 2007, at 09:23.