julia> Pkg.add("Lint.jl")
ERROR: unknown package Lint.jl
Very good idea. Should be simple to implement.
Also in e.g.
using Lint.jl
import Lint.jl
PkgDev is another: how many times have I said PkgDev.generate("MyNewPackage.jl") and created a MyNewPackage.jl.jl?
What if a package is named "package.jl"? That is, the source file is "package.jl.jl". Such a naming pattern is not hard to imagine. Maybe somebody has a package for different languages, and decided to append .py, .jl, etc to the package name to identify the language.
Would anybody really have a source file package.jl.jl? Have you ever actually seen that? We should definitely be anti-encouraging that.
I have never seen it. But it should be kept in mind if one decides that Pkg.add("Lint.jl") automatically removes the .jl. Maybe mention it in the documentation.
Also in e.g.
using Lint.jl
import Lint.jl
Note that these are already legal expressions.
Ah, I was checking on 0.5 where they weren't, thanks.
It always is
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-pc-linux-gnu
julia> module A
jl = 1
end
A
julia> using A.jl
Ah, oops, thanks.
As @yuyichao pointed out, using Foo.jl already has a meaning. Package names can't contain dots so there's no actual danger of a package named Foo.jl with source file Foo.jl.jl.
Most helpful comment
PkgDevis another: how many times have I saidPkgDev.generate("MyNewPackage.jl")and created aMyNewPackage.jl.jl?