# Learning Elixir: Alias, Import, Require and Use

**URL:** <https://forum.elixirforum.com/t/learning-elixir-alias-import-require-and-use/76374>\
**Category:** Blog Posts\
**Tags:** learning-elixir, blogs-by-abreujp\
**Created:** [August 15, 2026, 11:21am UTC](https://forum.elixirforum.com/t/learning-elixir-alias-import-require-and-use/76374 "2026-08-15T11:21:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abreujp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/abreujp/32/37856_2.png) [@abreujp](https://forum.elixirforum.com/u/abreujp)\
**Post date:** [August 15, 2026, 11:21am UTC](https://forum.elixirforum.com/t/learning-elixir-alias-import-require-and-use/76374/1 "2026-08-15T11:21:45Z")

</div>

### 

I’ve published a new article in my Elixir learning series on dev.to exploring the module directives — alias, import, require, and use — the four tools that control how names from other modules become available in ours.

The article covers:

- The difference between the three lexically scoped directives and the use macro
- Using alias to shorten module names, including the :as option, grouping with braces, and nested aliases
- Bringing functions into scope with import, with only:, except:, and filtering functions vs macros
- How lexical scope works inside functions and what happens when imports collide
- Opting into macros with require, using the classic Integer.is\_even/1 example
- use as an extension point and how it expands to require plus a **using** /1 callback
- Putting all three directives together in a realistic module
- Practical guidelines for when to reach for each tool — and why alias often beats import

With complete working examples you can copy into IEx, you’ll learn how these directives shape the namespace of a module and make the origin of every name clear — a big step toward reading and organizing Elixir code confidently.

Check it out:

### 

> **[Learning Elixir: Alias, Import, Require and Use](https://dev.to/abreujp/learning-elixir-alias-import-require-and-use-2hk2)**
>
> I like to think of the four tools in this article — alias, import, require, and use — as four...
