To pluralize or not to pluralize the name of a package?

According to the Julia package naming guidelines (5. Creating Packages · Pkg.jl):

  1. Packages that provide most of their functionality in association with a new type should have pluralized names.
  • DataFrames provides the DataFrame type.
  • BloomFilters provides the BloomFilter type.
  • In contrast, JuliaParser provides no new type, but instead new functionality in the JuliaParser.parse() function.

In my case, my package which I will eventually submit is called AcceleratorLattice.jl. There is no AcceleratorLattice type but there is a Lattice type. So should I be calling my package AcceleratorLattices.jl or does it matter?

Thanks for any advice.

2 Likes

Maybe plural should be used if the main Type/structure is expected to have many instances in an application, and singular if the main Type/structure is expected to be a singleton.

1 Like

Do you expect that your package will provide multiple sub-types of the Lattice type? Then I would use plural.

My package KiteModels provides the type AbstractKiteModel and different concrete implementations of this type, therefore I use plural.

1 Like

According to the guidelines you quote, your package name should be pluralized.

There’s also the possibility that you might add more or different types over time, in which case it’s good to allow for that possibility.

1 Like

Hard to say in the abstract, but having glanced at the documentation linked from your README, I would indeed lean towards the pluralized AcceleratorLattices being the more Julian name

One more argument for pluralization: Even if you only provide a single type, users will probably create many different instances of that type.

1 Like

My understanding was that this is the argument for pluralization

But I didn’t think it had been brought up in this thread, though now I see @Dan did.

Essentially, there will be only be the one Lattice struct.