Jump to content

Talk:Call a function: Difference between revisions

m
Operators may be outside the scope of this task
(I think splitting is probably more appropriate.)
m (Operators may be outside the scope of this task)
Line 3:
:Some languages have different mechanisms for functions and subroutines, and the Function definition task did not consider calling a function. This task provides a centralized comparative reference for all of the calling mechanisms. I know other tasks may utilized mechanisms that are used in other tasks, but this does not necessarily help with comparison of sub methods, because different approaches to a solution may have been used, so the sub methods are not present in the solution, even though they are supported by the language. To find out how to call a function, we really need a task that demonstrates this. [[User:Markhobley|Markhobley]] 14:23, 15 July 2011 (UTC)
 
 
== Huh? ==
 
 
In some languages, at least, there are multiple ways of doing things -- especially something so basic as "calling a function". Is the intent of this task to show typical use? Or is it a much larger task of showing various or all possible ways of accomplishing these tasks? Also, what is a "function" if the language spec does not use the term -- is it "anything that can be said to be equivalent to the mathematical concept of a function?" (or some constrained version of that -- if so, what kind of constraints are we talking about here?) or is it "anything that can be said to be equivalent to language X's concept of a function?" (if so, what is X?) or is it some other concept which is independent of language X? --[[User:Rdm|Rdm]] 14:51, 15 July 2011 (UTC)
Line 22 ⟶ 23:
:I don't think that we should split the task. However, we could cross reference to another task where an appropriate explanation is given. For example, if a language supports named parameters, we could say: "This language supports [[Named parameters|calling a function using named parameters]]", with a link to the appropriate explanation. [[User:Markhobley|Markhobley]] 16:31, 16 July 2011 (UTC)
:: Splitting the task is probably appropriate, just based on Donal's note. You might split it as a set of closely-related tasks, with subpages. Such as [[Call a function/something specific]]. Or you might use a category to group them. Or you might play with {{tmpl|collection}} or similar. --[[User:Short Circuit|Michael Mol]] 01:47, 17 July 2011 (UTC)
 
== Operators ==
 
Operators are generally a separate concept from functions (and outside the scope of this task, unless they are called in the same way as functions, can be used in place of functions, or are needed to demonstrate a method of invoking a function). I notice that the perl6 examples contain explanations relating to operators. I don't know perl6, but presumably, these need to be extracted and moved to a task that describes operators and their utilization. [[User:Markhobley|Markhobley]] 18:21, 17 July 2011 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.