[racket-dev] package name restrictions - why?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jul 31 19:42:51 EDT 2013

At Wed, 31 Jul 2013 15:02:34 -0400, Tony Garnock-Jones wrote:
> > Finally, there's the question of inference that `raco pkg install' and
> > other tools perform on a string that represents a package source.
> > Keeping the package-name grammar simple makes that inference more
> > predictable.
> Do you have an example in mind? I can imagine permitting ":" in package 
> names would make this difficult, but other than that, my imagination is 
> failing me in coming up with something that'd make inference trickier.
> > I see what you mean, and yet "foobar.rkt" seems like a strange name for
> > a Racket package. In particular, I'd expect it to be inferred as a
> > filename source, instead of a package-name source, if we ever manage to
> > make individual files act as packages (as some have suggested).
> That's a problem we don't have right now. But I do have the problem of a 
> git repo named "something.rkt" which I'd like to straightforwardly use 
> as a package.

Now that I think about it, we do have the problem now with
"foobar.zip", which is inferred to be a file name (and I think we want
to keep that). In other words, simply allowing "." in a package name
would already create some amount of inference trouble/complexity.

I'm sympathetic to the idea of relaxing the syntax of package names,
and I started in that direction a couple of times for different
characters --- but I ran into trouble each time and backed off.

Posted on the dev mailing list.