# How does \_\_using\_\_ actually work?

**URL:** <https://forum.elixirforum.com/t/how-does-using-actually-work/19656>\
**Category:** Questions\
**Tags:** macros, \_\_using\_\_\
**Created:** [January 24, 2019, 10:47pm UTC](https://forum.elixirforum.com/t/how-does-using-actually-work/19656 "2019-01-24T22:47:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hauleth](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/32/18942_2.png) [@hauleth](https://forum.elixirforum.com/u/hauleth)\
**Post date:** [January 24, 2019, 11:17pm UTC](https://forum.elixirforum.com/t/how-does-using-actually-work/19656/3 "2019-01-24T23:17:18Z")

</div>

In short, this:

```elixir
defmodule A do
  use Foo, opts
end

```

Is exactly the same as:

```elixir
defmodule A do
  require Foo
  Foo. __using__ (opts)
end

```

This is just sugar over it, see for [yourself](https://github.com/elixir-lang/elixir/blob/v1.8.0/lib/elixir/lib/kernel.ex#L4945).

---

_[View the full topic](https://forum.elixirforum.com/t/how-does-using-actually-work/19656)._
