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

> Thomas seems confused here. An API (declaring code) is not a computer program. A computer cannot execute declaring code - by definition - because it is missing the implementation.

This standard doesn't really make sense, and the legal standard says nothing about executability. What about programs with external dependencies, or a code snippet? Those won't necessarily be executable in a self-contained sandbox, but I'd certainly consider them computer programs.

Also, per Thomas's dissent:

> The majority also belittles declaring code by suggesting it is simply away to organize implementing code. Not so. Declaring code defines subprograms of implementing code, including by controlling what inputs they can process. Similarly, the majority is wrong to suggest that the purpose of declaring code is to connect pre-existing method calls to implementing code. Declaring code creates the method calls.

He clearly has a much better understanding of APIs than some software engineers I've worked with.



> Declaring code defines subprograms

Absolutely not. No points awarded.

Declaring code declares subprograms. They are defined by the implementation.

> A declaration provides basic attributes of a symbol: its type and its name. A definition provides all of the details of that symbol--if it's a function, what it does; if it's a class, what fields and methods it has; if it's a variable, where that variable is stored.

https://www.cprogramming.com/declare_vs_define.html

> the purpose of declaring code is to connect pre-existing method calls to implementing code

That sounds mostly right to me. Without declarations, the compiler cannot connect the function call to the implementation. Thomas ignores a crucial idea that decoupling definition & declaration enables multiple implementations for the same declaration.

> Declaring code creates the method calls.

That's nonsense. I have no idea what this means.


"Declaring code" is a specific term of art used in this case. For an example of what they consider declaring code vs. implementation code, see page 38 of the decision which has a handy diagram and example.

> That's nonsense. I have no idea what this means.

He's referring to how the workflow for an API generally involves gathering requirements, writing the "defining code", and then finally implementing the functionality promised by the interface. From that perspective, the defining code determines what implementation code is created, rather than linking up already existing implementation code.




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

Search: