Knowledge (XXG)

Talk:Function overloading

Source đź“ť

446: 144: 396: 71: 53: 22: 491: 561:"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: 165: 543:) 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. 526:
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.
601:
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.
189: 329: 630: 111: 246: 184: 117: 635: 87: 640: 625: 291: 130: 78: 58: 265: 237: 354: 218: 310: 275: 156: 33: 199: 320: 86:
related articles on Knowledge (XXG). If you would like to participate, please visit the project page, where you can join
517: 285: 347: 256: 39: 535:
I've removed the how-to flag after changing the constructor example, adopting an example from the old page
400: 536: 548: 540: 507: 465: 404: 503: 458: 175: 21: 469: 544: 607: 301: 227: 83: 445: 143: 166:
Requested articles/Applied arts and sciences/Computer science, computing, and Internet
619: 603: 510:. For the contribution history and old versions of the redirected page, please see 611: 552: 208: 70: 52: 485: 386: 284:
Find pictures for the biographies of computer scientists (see
15: 512: 498: 428: 422: 416: 410: 82:, a collaborative effort to improve the coverage of 190:Computer science articles needing expert attention 116:This article has not yet received a rating on the 330:WikiProject Computer science/Unreferenced BLPs 8: 631:Unknown-importance Computer science articles 96:Knowledge (XXG):WikiProject Computer science 516:; for the discussion at that location, see 247:Computer science articles without infoboxes 185:Computer science articles needing attention 539:(which I merged with this page as well as 453:Here are some tasks awaiting attention: 151:Here are some tasks awaiting attention: 125: 47: 49: 19: 641:Knowledge (XXG) pages with to-do lists 636:WikiProject Computer science articles 99:Template:WikiProject Computer science 7: 76:This article is within the scope of 38:It is of interest to the following 266:Timeline of computing 2020–present 14: 626:C-Class Computer science articles 292:Computing articles needing images 489: 444: 394: 142: 69: 51: 20: 1: 553:21:32, 20 February 2009 (UTC) 346:Tag all relevant articles in 90:and see a list of open tasks. 355:WikiProject Computer science 131:WikiProject Computer science 79:WikiProject Computer science 286:List of computer scientists 657: 118:project's importance scale 348:Category:Computer science 124: 115: 102:Computer science articles 64: 46: 563: 350:and sub-categories with 612:10:15, 6 May 2014 (UTC) 537:Overload (programming) 499:Overload (programming) 464:Consider merging with 311:Computer science stubs 28:This article is rated 496:The contents of the 32:on Knowledge (XXG)'s 541:Operator overloading 508:Function overloading 466:operator overloading 405:Function overloading 129:Things you can help 470:ad-hoc polymorphism 434:Updated 2011-03-10 34:content assessment 524: 523: 484: 483: 478: 477: 385: 384: 381: 380: 377: 376: 373: 372: 369: 368: 648: 597: 594: 591: 588: 585: 582: 579: 576: 573: 570: 567: 515: 493: 492: 486: 448: 441: 440: 435: 398: 397: 387: 359: 353: 228:Computer science 157:Article requests 146: 139: 138: 126: 104: 103: 100: 97: 94: 93:Computer science 84:Computer science 73: 66: 65: 59:Computer science 55: 48: 31: 25: 24: 16: 656: 655: 651: 650: 649: 647: 646: 645: 616: 615: 599: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 559: 533: 511: 490: 480: 479: 474: 409: 395: 365: 362: 357: 351: 339:Project-related 334: 315: 296: 270: 251: 232: 213: 194: 170: 101: 98: 95: 92: 91: 29: 12: 11: 5: 654: 652: 644: 643: 638: 633: 628: 618: 617: 564: 558: 556: 532: 529: 522: 521: 494: 482: 481: 476: 475: 473: 472: 452: 450: 449: 437: 392: 390: 383: 382: 379: 378: 375: 374: 371: 370: 367: 366: 364: 363: 361: 360: 343: 335: 333: 332: 326: 316: 314: 313: 307: 297: 295: 294: 289: 281: 271: 269: 268: 262: 252: 250: 249: 243: 233: 231: 230: 224: 214: 212: 211: 205: 195: 193: 192: 187: 181: 171: 169: 168: 162: 150: 148: 147: 135: 134: 122: 121: 114: 108: 107: 105: 88:the discussion 74: 62: 61: 56: 44: 43: 37: 26: 13: 10: 9: 6: 4: 3: 2: 653: 642: 639: 637: 634: 632: 629: 627: 624: 623: 621: 614: 613: 609: 605: 562: 557: 555: 554: 550: 546: 542: 538: 531:"How-to" flag 530: 528: 519: 518:its talk page 514: 509: 505: 501: 500: 495: 488: 487: 471: 467: 463: 461: 460: 455: 454: 451: 447: 443: 442: 439: 436: 433: 430: 427: 424: 421: 418: 415: 412: 408: 406: 402: 391: 389: 388: 356: 349: 345: 344: 342: 340: 336: 331: 328: 327: 325: 323: 322: 317: 312: 309: 308: 306: 304: 303: 298: 293: 290: 287: 283: 282: 280: 278: 277: 272: 267: 264: 263: 261: 259: 258: 253: 248: 245: 244: 242: 240: 239: 234: 229: 226: 225: 223: 221: 220: 215: 210: 207: 206: 204: 202: 201: 196: 191: 188: 186: 183: 182: 180: 178: 177: 172: 167: 164: 163: 161: 159: 158: 153: 152: 149: 145: 141: 140: 137: 136: 132: 128: 127: 123: 119: 113: 110: 109: 106: 89: 85: 81: 80: 75: 72: 68: 67: 63: 60: 57: 54: 50: 45: 41: 35: 27: 23: 18: 17: 600: 560: 534: 525: 497: 457: 456: 438: 431: 425: 419: 413: 399: 393: 338: 337: 321:Unreferenced 319: 318: 300: 299: 274: 273: 255: 254: 236: 235: 217: 216: 198: 197: 174: 173: 155: 154: 77: 40:WikiProjects 513:its history 620:Categories 502:page were 401:To-do list 209:Computing 257:Maintain 200:Copyedit 604:Sawatts 429:refresh 417:history 238:Infobox 176:Cleanup 30:C-class 587:return 545:Dindon 504:merged 219:Expand 36:scale. 506:into 459:Merge 423:watch 302:Stubs 276:Photo 133:with: 608:talk 549:talk 411:edit 403:for 566:def 468:or 112:??? 622:: 610:) 584:): 551:) 358:}} 352:{{ 606:( 596:1 593:+ 590:x 581:0 578:= 575:x 572:( 569:f 547:( 520:. 462:: 432:· 426:· 420:· 414:· 407:: 341:: 324:: 305:: 288:) 279:: 260:: 241:: 222:: 203:: 179:: 160:: 120:. 42::

Index


content assessment
WikiProjects
WikiProject icon
Computer science
WikiProject icon
WikiProject Computer science
Computer science
the discussion
???
project's importance scale
WikiProject Computer science

Article requests
Requested articles/Applied arts and sciences/Computer science, computing, and Internet
Cleanup
Computer science articles needing attention
Computer science articles needing expert attention
Copyedit
Computing
Expand
Computer science
Infobox
Computer science articles without infoboxes
Maintain
Timeline of computing 2020–present
Photo
List of computer scientists
Computing articles needing images
Stubs

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑