# Why is it possible to shadow function names in OpenZeppelin's contracts?

**URL:** <https://forum.openzeppelin.com/t/why-is-it-possible-to-shadow-function-names-in-openzeppelins-contracts/27702>\
**Category:** Smart Contracts\
**Created:** [April 17, 2022, 12:49pm UTC](https://forum.openzeppelin.com/t/why-is-it-possible-to-shadow-function-names-in-openzeppelins-contracts/27702 "2022-04-17T12:49:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kulk0](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kulk0/32/13018_2.png) [@Kulk0](https://forum.openzeppelin.com/u/Kulk0)\
**Post date:** [April 17, 2022, 12:49pm UTC](https://forum.openzeppelin.com/t/why-is-it-possible-to-shadow-function-names-in-openzeppelins-contracts/27702/1 "2022-04-17T12:49:18Z")

</div>

I've been looking at OpenZeppelin's Address.sol contract and found something interesting.

As you can see in the picture,

 ![Snímka obrazovky 2022-04-16 o 18.52.22](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/f/fdb59db221cfa980dd8bb03f65b0df5985dca5e5.png)

Both functions have the same name and the first one just calls the second one.

1. Why is it even possible to shadow function names?
2. Is there any benefit to having it this way?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![TtheBC01](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/tthebc01/32/14174_2.png) [@TtheBC01](https://forum.openzeppelin.com/u/TtheBC01)\
**Post date:** [April 17, 2022, 5:13pm UTC](https://forum.openzeppelin.com/t/why-is-it-possible-to-shadow-function-names-in-openzeppelins-contracts/27702/2 "2022-04-17T17:13:11Z")

</div>

[Function overloading](https://docs.soliditylang.org/en/v0.8.13/contracts.html?highlight=overload#overload-resolution-and-argument-matching) is a perfectly normal thing to do in Solidity; there are lots of reasons for [supporting it in a programming language](https://en.wikipedia.org/wiki/Function_overloading). The EVM distinguishes between the different implementations based on what arguments you have provided.

---

<div class="post-metadata">

**Author:** ![Kulk0](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kulk0/32/13018_2.png) [@Kulk0](https://forum.openzeppelin.com/u/Kulk0)\
**Post date:** [April 17, 2022, 9:19pm UTC](https://forum.openzeppelin.com/t/why-is-it-possible-to-shadow-function-names-in-openzeppelins-contracts/27702/3 "2022-04-17T21:19:28Z")

</div>

Oh okay thanks a lot!
