Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace abuse #22

Closed
tangent-vector opened this issue Jun 15, 2017 · 1 comment
Closed

Namespace abuse #22

tangent-vector opened this issue Jun 15, 2017 · 1 comment
Labels
kind:cleanup tech debt and rough edges

Comments

@tangent-vector
Copy link
Contributor

The existing "Spire" code made heavy use of namespaces, but that just complicates what we are trying to accomplish in a lean-and-mean codebase.

I'm not 100% decided on what an ideal convention should be, but my first stab would be:

  • All user-face C++ interfaces (currently just inline wrapper stuff around the C API) will reside in the slang namespace

  • All implementation stuff will reside in the Slang namespace (notice capitalization) with no nesting.

  • If we really need multiple namespaces (e.g., multiple back-ends need types with similar names), then it probably makes sense to give each a distinct top-level namespace with a Slang prefix, just to keep things flat.

I'm not enamored of having a distinct namespace for public API vs. private implementation. I might advocate for finding a different way to expose the API that avoids the need for the opaque wrapper types, so that we can actually expose the same namespace and type names (potentially making Slang more debuggable for client code).

@tangent-vector tangent-vector added the kind:cleanup tech debt and rough edges label Jun 15, 2017
@tangent-vector tangent-vector mentioned this issue Jun 15, 2017
@tangent-vector-personal

PR #26 addressed this.
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:cleanup tech debt and rough edges
Projects
None yet
Development

No branches or pull requests

2 participants