News for hackers. Stuff that matters.
Re:OpenGL API Documentation by nixpulvis on Friday June 19, 2015 @04:56AM (#9743669)
There is something oddly satisfying about just the methods names on the left.
Re:OpenGL API Documentation by kelnos on Friday June 19, 2015 @05:07AM (#9743700)
What else would be there?

("Method" as the column name is actually incorrect... they're just bare C functions.)

Re:OpenGL API Documentation by pierrec on Friday June 19, 2015 @10:31AM (#9744980)
What else would be there?

It's pretty standard to have the function's type signature and possibly a short description in the function lists of API docs. Here's a random example:

http://ffmpeg.org/doxygen/trunk/group__lavc__fft.html#func-m...

If a function has the same name across different versions of the OpenGL API, does it also have the same type signature? If so, it would be nice to have a version of this with more details.

Re:OpenGL API Documentation by innguest on Friday June 19, 2015 @01:39PM (#9746397)
What good is showing the function signature? It will be different per language implementing the OpenGL bindings.

The docs should be just about the OpenGL functions, not about how C implements them.

Re:OpenGL API Documentation by toxicFork on Friday June 19, 2015 @06:06AM (#9743840)
Re:OpenGL API Documentation by friendzis on Friday June 19, 2015 @06:23AM (#9743893)
I find term "function" rather confusing and improper for programming language construct, because we use the same term in natural languages that is not necessarily 1:1 mapping. Consider commit message: "Implemented function `sort()` implementing sort(ing) function(ality)".
Re:OpenGL API Documentation by moron4hire on Friday June 19, 2015 @08:13AM (#9744170)
If we want to get really picky, they are procedures.

I think we should start to transition to using the word function only in the connotation provided in functional programming languages, where functions are first class citizens and can be treated as values. Also, should probably prefer to imply a lack of side effects from the word function.

Method is clearly a certain function or procedure that is scoped to a class. So that leaves procedure as a name left over for the type of bare function that isn't a value, that is a statement rather than an expression.

I think subroutine and subprogram are just archaic sounding, and don't really imply anything that the others don't. Method, functions, procedures, I think that's all we need.

Re:OpenGL API Documentation by Tyr42 on Friday June 19, 2015 @08:57AM (#9744343)
So, the distinction that I've learnt is that functions return values and procedures are run for their side effects.

So, strlen, for example, is a function, and printf is a procedure.

(Yes I know prints returns an int, but it's run for it's side effects primarily.)

Re:OpenGL API Documentation by Retra on Friday June 19, 2015 @04:10PM (#9747327)
"Function" comes from mathematics, where it is a well-defined and total relation. The main place programmers use it wrong is that they often use the same term for partial functions, but that's easy to overlook, since a partial function is a 'kind' of function. (That and side effects, but those can be considered to be elided parts of the domain and codomain.)

What you are talking about might be called a relation, which is more general.

Re:OpenGL API Documentation by toxicFork on Friday June 19, 2015 @06:53AM (#9743963)
In that case you can omit the left side: "Implemented sorting functionality" or the right side: "Implemented function: sort".
Re:OpenGL API Documentation by dietrichepp on Friday June 19, 2015 @06:36AM (#9743929)
I think they are typically called "entry points", at least in the spec. The term "function" is used for GLSL functions and for things like blending functions.
Re:OpenGL API Documentation by rootlocus on Friday June 19, 2015 @06:15AM (#9743864)
Being pedantic on a pedantic commit: You should use English sentences when writing commit messages. :P
Re:OpenGL API Documentation by toxicFork on Friday June 19, 2015 @06:32AM (#9743915)
Thanks, fixed the PR :)