Talk:Function prototype: Difference between revisions
Content deleted Content added
Prototypes are fairly general |
m →Common Lisp: was solved afterwards |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 3:
::I found a wikipedia article, if that helps: http://en.wikipedia.org/wiki/Function_prototype [[User:Markhobley|Markhobley]] 01:49, 22 July 2011 (UTC)
::Prototypes are fairly general, but not all languages use them. [[User:Markhobley|Markhobley]] 01:56, 22 July 2011 (UTC)
:::You probably wanted [[wp:Type signature|this link]] instead, which is a more general concept when the language is strongly typed. --[[User:Ledrug|Ledrug]] 02:45, 22 July 2011 (UTC)
::::Hmmm. They probably need to merge the two articles. :) [[User:Markhobley|Markhobley]] 08:53, 22 July 2011 (UTC)
I agree that this task is overly specific to a particular language design; '''I disapprove of it''' as it stands, because a lot of languages' take on this problem is simply "We do not require declaration-before-use". I was going to suggest that it be generalized to "that which the language requires you to do to write mutually recursive functions", but we already have the task [[mutual recursion]]. I would like to see this draft task generalized to ''state a problem'', allowing languages' methods of solution of it to be illustrated, rather than showing variants of a specific solution. —[[User:Kevin Reid|Kevin Reid]] 21:31, 22 July 2011 (UTC)
::Variants of a specific solution are good for making comparisons of languages IMHO. There are lots of tasks that are specific to a particular families of languages, because languages deal with different aspects of computing, and some languages are just designed in a particular way. Some tasks will fit languages better than others. For example, drawing a 3d object task may not suit a data extraction and reporting language. Not all languages even have functions, but that does not mean that we should not have the tasks relating to functions. We can simply omit languages that are not well suited to the job in hand, or create a workaround.
The task in this case is to show how function prototypes are defined within the language. Some languages will allow prototyping, others do not offer this facility, or do not need it. If the language does not require functions or does not have the facility for functions to be prototyped, then it can simply be omitted from the list.
[[User:Markhobley|Markhobley]] 21:56, 22 July 2011 (UTC)
|