Jump to content
Wikipedia The Free Encyclopedia

Talk:Function overloading

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This article is rated C-class on Wikipedia's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject icon Computer science
WikiProject icon This article is within the scope of WikiProject Computer science , a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.Computer scienceWikipedia:WikiProject Computer scienceTemplate:WikiProject Computer scienceComputer science
??? This article has not yet received a rating on the project's importance scale.
Things you can help WikiProject Computer science with:

icon To-do list for Function overloading: edit · history · watch · refresh · Updated 2011年03月10日


Here are some tasks awaiting attention:
The content of Overload (programming) was merged into Function overloading. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. For the discussion at that location, see its talk page.

Should there be a different section for Constructor overloading at the very beginning because its done syntactically in the same way. so there should be general function overloading at the first section I think. then method overloading and constructor overloading at the end.

"How-to" flag

[edit ]

I've removed the how-to flag after changing the constructor example, adopting an example from the old page Overload (programming) (which I merged with this page as well as Operator overloading) which I think fixes the problem of the "how-to guide" tone. I also introduced some content from that page in the article's introduction, which I'm not sure about. Specifically, I don't know if using italics for method calls is too visually jarring. I'm open to suggestions there. Dindon (talk) 21:32, 20 February 2009 (UTC) [reply ]

[edit ]

"A common error would be to assign a default value to the object in the second method, which would result in an ambiguous call error, as the compiler wouldn't know which of the two methods to use." I'm not sure what this means. Is it talking about a language that has optional parameters that can default to values? i.e: Python:

deff(x=0):
 return x+1

I presume that this is what is being referred to. If there was also a 'def f():', then where the code calls 'f()' - does it mean 'f()' or 'f(0)'? However, I would expect the compiler or interpreter to flag this ambiguity as an error. Sawatts (talk) 10:15, 6 May 2014 (UTC) [reply ]

AltStyle によって変換されたページ (->オリジナル) /