Wednesday, September 19, 2012

ParaSail standard library prefix?

Due to popular demand, we are going to try to solidify and extend the ParaSail standard library.  One practical question is the naming convention for the ParaSail standard library.  C++ uses "std::" as the namespace for the standard library.  Java uses "java." or "javax." or "com.sun." or "com.oracle.".  C# (and .NET in general) uses "System." as the prefix.  Ada uses "Ada." (as well as "System." and "Interfaces.").

So here are some possibilities for ParaSail:
  • Standard::
  • System::
  • ParaSail::
  • PS::
  • PSL::
  • ??
I think I am currently favoring "System::" because ParaSail has those two upper case letters which would be a bit of a pain, and the others don't seem to capture the idea as well.  Note that we will probably arrange things so that you rarely need to write the "System::" prefix, but if there is ambiguity, then it would be necessary.

Comments?

2 comments:

  1. I would say think about whether everything should actually be in one namespace. It might be that a few namespaces might be a better design.

    If you decide to put everything in one namespace, probably don't use the name of the language. Standard seems weird, but is probably actually the most accurate. System could mean a variety of things.

    ReplyDelete
    Replies
    1. I agree that you might want multiple namespaces, but probably you still want a top-level one under which the multiple standard-library namespaces appear. Perhaps "PSL::" for "ParaSail Standard Library" isn't so bad after all as a prefix. It has the advantage of being relatively short, and in all upper case which makes collisions very unlikely. A typical user might like "System::" for parts of their own application.

      Delete