Talk:Function prototype: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Hmmm. They probably need to merge the two articles. :))
(Generalize, but to what?)
Line 5: Line 5:
:::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)
:::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)
::::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)

Revision as of 21:31, 22 July 2011

What is a function prototype? The task should not assume the reader knows. --Paddy3118 21:00, 21 July 2011 (UTC)

Function prototype is not a truly general language concept. I think the task author has some very specific language in mind. --Ledrug 01:07, 22 July 2011 (UTC)
I found a wikipedia article, if that helps: http://en.wikipedia.org/wiki/Function_prototype Markhobley 01:49, 22 July 2011 (UTC)
Prototypes are fairly general, but not all languages use them. Markhobley 01:56, 22 July 2011 (UTC)
You probably wanted this link instead, which is a more general concept when the language is strongly typed. --Ledrug 02:45, 22 July 2011 (UTC)
Hmmm. They probably need to merge the two articles. :) 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. —Kevin Reid 21:31, 22 July 2011 (UTC)