Quick opinion poll regarding style

Do you like dots in package or ASDF system names?

  1. I do like them. (Please explain why.)
  2. I hate them. They break the pleasant symmetries formed by parentheses, dashes, and colons. E.g., (foo-bar-quux:frob-baz-now) vs. (foo.bar-quux:frob-baz-now)
  3. I don't care.

Please leave your answer in the comment form. Thank you.

27 komentoj:

Anonymous said...

I don't care.

-- xach

Stewie said...

Option 2.

Anonymous said...

I certainly lean towards 2 although "hate" is a rather strong term. I wonder how you would replace the handy ': ':: notation with periods. For some reason two consecutive periods seems more weird to me than two consecutive colons. Not to mention the handy short notation for references to the keyword package.

Ken Causey

Anonymous said...

Oops, I suspect now I should have read more carefully. "In package names..." You mean internal to the package name itself and not as a separator between the package name and the symbol?

If this is in fact what you mean to suggest, I think I would find it confusing to find a colon in a package name.

Ken Causey

HilbertAstronaut said...

I don't mind the dots, and I've been using them in my packages, but they do imply a hierarchy that really isn't there (because the package system isn't hierarchical). In Java, which has a similar package naming convention, this can be a source of confusion: e.g., "import java.util.*" doesn't import java.util.Arrays.*, because java.util.Arrays isn't a subpackage of java.util.

Eric said...

i lean towards option 2 only because i see some java-like hierarchy idioms that don't really belong.

mlivshin said...

I use them, both in system and package names, to implement the Java hierarchical naming style.

I see Lisp package and system definitions as an aesthetic-free zone; the usual conventions are rather ugly to begin with, so why bother?

szopa said...

Option 2. The colons suggest that something that doesn't exist exists (i.e. a package hierarchy), and thus are ugly.

Geoff Wozniak said...

Option 3: indifference.

iakovz said...

2. I hate them. They break the pleasant symmetries formed by parentheses, dashes, and colons. E.g., (foo-bar-quux:frob-baz-now) vs. (foo.bar-quux:frob-baz-now)

Anonymous said...



Anonymous said...

[1] for package names because they visually indicate hierarchal relationships between packages (and cannot be confused for compound nouns ;-)

I also use the .internal-function instead of %internal-function naming convention so I guess I don't mind periods...


Nikodemus Siivola said...

All of the above?

I don't like them, but I don't care, really.

Sometimes they can carry useful information:


eg. separate a version number from the name.

Names themselves are naturally dashed. That's the way you write.

To use them to pretend you have an N level namespace... well, if it makes you happy. Just remember that Allegro will interpret them differently.

I think I'd prefer using "/" to delimit pseudonamespaces myself:


One thing I _do_ hate are inverse domain names. Please:


are not part of the same "net" hierarchy in any useful sense of the word for a package. I can stomach domain names, as they are a semi-sane way of bootstrapping a unique namespace -- but inversion adds no information, and makes them just harder to read. There is also no reason to use dots after them:


Domain names also from a problem when the package changes owners, or the owner changes domains. Nothing earth-shattering, but they don't solve everything like some people seem to think.

Setting up a distributed lisp package name reservation system might actually be interesting...

Anonymous said...

I don't care as long as the package name don't exceed 10 characters.

As much as i love Peter's pcl book, the com.xxxxxxxxxxxx.xxxxx.xxx package names that he used are just ugly as hell.

Anonymous said...

I wouldn't generally use dots in package names, but I don't have strong dislike towards such use, so 2.5 :)

Anonymous said...

Option 2, too.

Daniel said...

I'd say I'm indifferent, although I think they can be quite useful. If it does become (very) popular, it could be useful/interesting to have a system that automatically assigned the most-specific part of the package name (after the last dot) as a nickname for that package, while avoiding collisions.

Anonymous said...

I don't care, although my preference would be to have no dots.

- Ora Lassila

Anonymous said...

Coming from a Java/C background, I lean heavily on 2, using "-" instead of dots and "thisIsAMethodOrFunction" was one of the things I really liked with Common Lisp. But I agree with Anonimo, hate is a strong word.

Kjeld. aka Denatus

Rich said...

I've used dots when (a) the software is hierarchical, (b) I want to avoid conflicting with future packages.

An interesting style is to use longer (though not Java long) dotted names as the package name, and define shorter nicknames. The nickname won't conflict in the future.

-Richard Newman

Sam Ask said...

Option 2. They are very ugly in a LISP contest. Like grinding teeth, or screeching chalk on blackboard.

Erlend said...

I'd actually go with option 1, because the dots give me redundancy enough to know what I'm reading the names of even if I fail to spot the semicolons. Makes reading easier.

But.. I, too, don't really feel very strongly about this.

Ignas Mikalajūnas said...

Option 2

Dots indicate separation in a different way than dashes do. foo.bar to me reads like 2 symbols foo and bar connected with a dot, foo-bar looks like 1 symbol composed of foo and then bar.

Though maybe that's only because i am using lesser languages too much.


Gary King said...

I like dots (mostly because Apple (and Java) use them) but they are a bit silly in vanilla Common Lisp because they have no semantics they way they do in Java and, e.g., Apple preference files...

Yannick Gingras said...

I don't like them. They are used with the Python and Java subpackage semantic but since the dot is not a sub package accessor in Common Lisp this is plain silly.

Robert said...

I like the use of dots because CL doesn't have a good scoping mechanism around packages. So as the body of code libraries grows, it's handy to be able to have names like sift.unifier (where sift is the name of the company where I work) or shop2.unifier (where SHOP2 is an open-source planning system which has many sub-packages). If you work heavily with symbolic programming, like I do, do you really want a package called just 'unifier'?
I suppose that you could use hyphens instead of dots. But hyphens are already used inside the package names (e.g., 'shop2.theorem-prover'), to separate words, so dots usefully provide a second sort of separator.

Anonymous said...

I don't really care. But dots are used in the hierarchical package extensions
of several widely-used lisp compilers. So if you're using hierarchical packages, you use dots. The choice has been made for you, dots it is.

yannick writes "dots are not a subpackage separator in Common Lisp". But in supersets of Common Lisp, including compilers as widely used as CMUCL and Allegro... they
already are