decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books
Your contributions keep Groklaw going.
To donate to Groklaw 2.0:

Groklaw Gear

Click here to send an email to the editor of this weblog.


Contact PJ

Click here to email PJ. You won't find me on Facebook Donate Paypal


User Functions

Username:

Password:

Don't have an account yet? Sign up as a New User

No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
PJ's friend's definition of API? | 52 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Google on substantial similarity of APIs
Authored by: SLi on Monday, April 23 2012 @ 04:30 PM EDT

An example without an analogy:

In C, there is a function (think method - they are almost the same thing) named printf(), which does formatted printing. It does this by taking as first parameter a format string and individual items to insert into the format string as further parameters.

There is a convention for the format string for types of parameters; for example, "%d" means "insert a decimal integer here". So, for example, the code

printf("Bob is %d years old.", 37);

would print "Bob is 37 years old".

Now, if you change the implementation of printf so that it's no longer "%d" but "$d" that specifies a decimal integer, you have not changed the signature of the printf() function in any way, but you certainly have broken the API.

The proposition "You have broken the API" is roughly equivalent to "You have changed the implementation so that programs that relied on the previous functionality no longer work in the same way". One way to do this is to change method signatures, which may result in old programs failing because you try to pass an integer where a string is required, or because you are trying to call a method which does not exist. Another way to do this is to change the behavior of the code so that it's not backwards compatible.

[ Reply to This | Parent | # ]

PJ's friend's definition of API?
Authored by: jbb on Monday, April 23 2012 @ 05:09 PM EDT
Could you please reiterate "PJ's friend's definition for API"? I couldn't figure out what you were referring to. I'm guessing you are talking about the article written by PJ and not the one you posted under.

I completely agree with you that an API includes signatures and meanings. My definition of an API is a mapping (in the mathematical sense) from signatures to meanings. IOW, every signature is associated with one specific meaning. I also really like the example you quoted from Google. However, since I don't know what you mean by "PJ's friend's definition for API" I can't figure out what you are trying to say. It seems that you think the friend said an API is just the signatures devoid of any meanings but I can't find where a statement like that was made.

Please forgive me if I'm missing something obvious.

---
Our job is to remind ourselves that there are more contexts than the one we’re in now — the one that we think is reality.
-- Alan Kay

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )