m33lky
m33lky

Reputation: 7275

namespace clashes in Julia

When I get libraries with the using keyword I get warnings in the console on startup. How can I mitigate the problem of name clashes? I don't see library alias keyword as which is available in other programming languages.

Upvotes: 6

Views: 818

Answers (1)

Chris Rackauckas
Chris Rackauckas

Reputation: 19132

You can use import instead. You can always alias it yourself since modules are just variables:

import DifferentialEquations
DiffEq = DifferentialEquations
const DE = DifferentialEquations # Don't know if const matters here

There's an open issue for providing import as syntactic sugar for this. https://github.com/JuliaLang/julia/issues/1255

Upvotes: 9

Related Questions