# Rename just one of imported names with "using"

**URL:** <https://discourse.julialang.org/t/rename-just-one-of-imported-names-with-using/105026>\
**Category:** General Usage\
**Tags:** question, package, import, using\
**Created:** [October 16, 2023, 5:05pm UTC](https://discourse.julialang.org/t/rename-just-one-of-imported-names-with-using/105026 "2023-10-16T17:05:29Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [October 17, 2023, 12:33am UTC](https://discourse.julialang.org/t/rename-just-one-of-imported-names-with-using/105026/13 "2023-10-17T00:33:55Z")

</div>

> [@stillyslalom](#):
>
> Should this approach replace what’s described in the manual?

I would argue that the `import/using`-`as` syntax should be preferred because not all exported variables are `const`, and their reassignments are reflected by imported names, not variables assigned in other modules. The difference doesn’t matter in this specific case because the exported `Point` _is_ `const`.

```julia
julia> module A
         export x
         x::Int = 0
       end;

julia> x::Int = -10; # let's make a name conflict

julia> using .A # non-conflicting names would be imported fine
WARNING: using A.x in module Main conflicts with an existing identifier.

julia> using .A: x as xA # rename for import
 │ Attempted to find missing packages in package registries but no registries are installed.
 └ Use package mode to install a registry. `pkg> registry add` will install the default registries.

julia> const xA2 = A.x ; xA3 = A.x ;

julia> @eval A x+=1; # increment x in module A

julia> A.x, xA, xA2, xA3 # only the import links the names
(1, 1, 0, 0)

```

---

_[View the full topic](https://discourse.julialang.org/t/rename-just-one-of-imported-names-with-using/105026)._
