Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
Why does Perl not have overloaded functions?
Why does Perl not have overloaded functions?
✍: Guest
Because you can inspect the argument count,
return context, and object types all by yourself.
In Perl, the number of arguments is trivially available
to a function via the scalar sense of @_, the return
context via wantarray(), and the types of the
arguments via ref() if they're references and
simple pattern matching like /^\d+$/ otherwise.
In languages like C++ where you can't do this, you
simply must resort to overloading of functions.
2013-09-06, 1880👍, 0💬
Popular Posts:
What is the version information in XML? “version” tag shows which version of XML is used.
Why does malloc(0) return valid memory address? What's the use? malloc(0) does not return a non-NULL...
How To Create an Add-to-Google-Reader Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS ...
How To Specify Two Background Images on a Page? - CSS Tutorials - Page Layout and Background Image D...
What Is Posting? Posting is an event that writes Inserts, Updates and Deletes in the forms to the da...