6 ms·
https://github.com/BSVino/docs.gl/pull/24 https://github.com/BSVino/docs.gl/pull/24 :D
by toxicFork 11y ago
https://github.com/BSVino/docs.gl/pull/24 https://github.com/BSVino/docs.gl/pull/24 :D
- rootlocus 11y agoBeing pedantic on a pedantic commit: You should use English sentences when writing commit messages. :P
- toxicFork 11y agoThanks, fixed the PR :)
- friendzis 11y agoI 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)".
- toxicFork 11y agoIn that case you can omit the left side: "Implemented sorting functionality" or the right side: "Implemented function: sort".
- moron4hire 11y agoIf 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.
- Tyr42 11y agoSo, 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.)
- Retra 11y ago"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.
- dietrichepp 11y agoI 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.