# How does Wolfram Language implement for enabling symbols to receive various forms of parameters? [duplicate]

How does the official implement a list/tuple of parameters that can be different in type and quantity as a whole?

Finally, I accepted the suggestion in @Kuba's comment ("tutorial/evaluation") as the "answer" according to @Shredderroy's comment:

the tutorial/evaluation suggestion by @Kuba is the best explanation that the general public can provide since Mathematica is a proprietary system.

### Details of the original question:

In particular, RegularPolygon and Plot3D – these two symbols make me most curious:

The lists of parameters accepted by RegularPolygon can be any of the following (can be found at the beginning of the official document):

RegularPolygon[{r, θ}, n]
RegularPolygon[{x, y}, rspec, n]


The lists of parameters of Plot3D can be any of the following:

Plot3D[{…, w[f_i], …}, …]
Plot3D[…, {x, y}∈reg]


Although using any programming language can achieve automatic matching of parameters by defining properties/rules/traits or by pattern matching, I still want to know what the specific implementation of these are by the official.

I am very grateful to you!

• Is this what you mean? foo[x_Integer]:=1; foo[x_String]:=2] – Kuba Jul 29 '19 at 10:32
• Performing 'evaluation', see tutorial/Evaluation. – Kuba Jul 29 '19 at 10:43
• The long comment thread illustrates well why this was not a clearly written question (BTW the title is still not decoupled)... – Szabolcs Jul 29 '19 at 11:31
• Interesting. The question was clear to me the moment I read the title. I think the tutorial/evaluation suggestion by @Kuba is the best explanation that the general public can provide since Mathematica is a proprietary system. Based on the description provided in the documentation there, it would not be too hard to suggest reasonable algorithms for implementing the ideas. But as to an authoritative account of the actual algorithms used by the Wolfram engineering team, well, that will probably be hard to come by. – Shredderroy Jul 29 '19 at 12:34
• Many WL functions are written at top level; i.e. in WL using definitions just like the user would. This is why changing system variables can be dangerous. – lirtosiast Jul 29 '19 at 13:23