./Foo isn't valid syntax, so that's not quite going to work. You could do @require "./Foo" instead. For what it's worth, I don't think that deciding whether to load a file or package based on capitalization is a good idea. One alternative would be to load a package if the argument is a symbol and load a file if the argument is a string.
On Mon, Aug 18, 2014 at 2:40 PM, TR NS <transf...@gmail.com> wrote: > > > On Monday, August 18, 2014 12:13:12 PM UTC-4, Stefan Karpinski wrote: > >> On Mon, Aug 18, 2014 at 11:56 AM, TR NS <tran...@gmail.com> wrote: >> >>> >>> On Monday, August 18, 2014 8:45:58 AM UTC-4, Stefan Karpinski wrote: >>>> >>>> It is a convention, but it isn't required anywhere or guaranteed. You >>>> can currently count on package names being ASCII. >>>> >>> >>> Do you expect the ASCII part will eventually change too? If I can count >>> on ASCII, that means I can pretty much count on the fact that foreign >>> languages such as Chinese and Arabic, that do not have capitalization, will >>> never be used for package names. And if that's always going to be the case, >>> then it seems like the capitalization thing may as well just be a rule and >>> not a convention. Of course, even if such languages are eventually >>> supported, it could still be a rule with an exception for such languages. >>> >>> I guess what I am saying, from the other way round, is if it's not going >>> to be a rule, why even bother with the convention? >>> >> >> The ASCII part seems like a good thing to stick to. Unicode support for >> file names is not universal yet and is very likely to cause problems. ASCII >> is pretty much the only thing you can count on working right in all file >> systems. >> >> Conventions are for people, not computers. None of the operating system, >> the language or the package manager have any reason to care if a package >> name is uppercase or not. It's nice for people if these things are somewhat >> consistent, however. Since module names in Julia are uppercase by >> convention, package names are too. But there's no good reason for the >> language or the package manager to fail if a module or package isn't >> uppercase. Why make things more rigid than they have to be? >> >> What's the reason you want to rely on packages being capitalized? >> > > In Rosoman's Require.jl (https://github.com/jkroso/Require.jl) it would > be nice if `@require foo` could mean local file, and `@import Foo` could > mean a package. One can still use `@import ./Foo` to force local lookup if > need be. If the capitalization convention is close enough to being a rule > to make no significant practical difference, then this would work and it > would be nice b/c the code would read a little better. But if not, local > imports will always have to have to be in the form of `./foo`. > >