Thomas may have phrased it badly, but his underlying point that declaring code in a program satisfies the 17 USC 101 definition of "computer program" seems sound.
Declaring code in statement based languages is (1) a set of statements, is (2) used directly or indirectly in a computer, and it is used (3) to bring about a certain result. That hits all the points listed in 17 USC 101.
This is trivial to prove. Take a program that works and remove the declaring code. The program no longer works. That shows that the declaring code is indeed being used by the computer, and it is being used to bring about a certain result.
That the declaring code is not directly used in actually calling the API is irrelevant. The "certain result" the declaring code is used to bring about is the compiler producing output that works with the API.
Declaring statements are pure data. "int add(int, int);" is a piece of data, not a series of instructions. It may as well be a 4-tuple: (int, "add", int, int). You could convert each class declaration to a series of 4-tuples and put it in a CSV file. Database rights are much weaker than copyright.
> Take a program that works and remove the declaring code.
Actually, it will work just fine, because you the implementation necessarily has declarations in them, and you can generate declarations from the implementation.
I think this is a poor argument. I could make this "data" argument about any computer program, or even any copyrighted work. E.g. every statement is an n-tuple that could be stored in a database.
Declaring code in statement based languages is (1) a set of statements, is (2) used directly or indirectly in a computer, and it is used (3) to bring about a certain result. That hits all the points listed in 17 USC 101.
This is trivial to prove. Take a program that works and remove the declaring code. The program no longer works. That shows that the declaring code is indeed being used by the computer, and it is being used to bring about a certain result.
That the declaring code is not directly used in actually calling the API is irrelevant. The "certain result" the declaring code is used to bring about is the compiler producing output that works with the API.