Skip to content

[DISCUSS] 6.0.0 restructure: file layout, namespaces, and C++17 - #528

Draft
leerho wants to merge 2 commits into
apache:masterfrom
leerho:restructure-proposal
Draft

leerho wants to merge 2 commits into
apache:masterfrom
leerho:restructure-proposal

Conversation

@leerho

@leerho leerho commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Two design documents for the 6.0.0 restructure, posted here so they can be commented on line by line. This PR is not intended to merge — it is a place to mark up the text. The decision thread will be on dev@datasketches.apache.org

restructure-draft-v2.md (pretty copy, the markup review copy is below) — the target file structure and namespace hierarchy: a single include root, one directory and nested namespace per sketch family, and an internal/ subdirectory for everything outside the supported API. Every header in the current tree is accounted for: kept, moved, renamed, split, or deleted. Includes the precedent in other libraries, 18 ratified decisions and 3 open items.

restructure-plan-detail.md (pretty copy, the markup review copy is below) — the sequencing: the PR order from the C++17 flag flip through the move, the namespace rewrite and the cleanup, plus a per-area breakdown and the techniques for keeping each PR reviewable.

Comments inline on the files are very welcome, particularly on the ratified decisions and the open items.

🤖 Generated with Claude Code

leerho and others added 2 commits September 22, 2026 16:55
Two design documents for community discussion, not intended to merge:

restructure-draft-v2.md defines the target file structure and namespace
hierarchy for 6.0.0 -- a single include root, one directory and nested
namespace per sketch family, and an internal/ subdirectory for everything
outside the supported API. It records 18 ratified decisions and 3 open
items.

restructure-plan-detail.md holds the sequencing: the PR order from the
C++17 flag flip through the move, the namespace rewrite and cleanup, plus
a per-area breakdown and the techniques for keeping each PR reviewable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Satisfies the RAT license audit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread restructure-draft-v2.md

```
include/datasketches/… the library — the only thing that is installed
test/datasketches/… mirrors include/datasketches/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal preference: could we use test/<area>/ instead? It would still mirror the sketch-family layout without the extra datasketches/ directory.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. The extra level is there to keep path ≡ namespace (convention 7) for tests too: each test file opens datasketches::, so test/datasketches/theta/ lines up the same way include/datasketches/theta/ does. It also leaves test/ itself free for things that don't mirror the include tree (CMake, TCK output, fixtures tooling) without them looking like areas. Helper includes are the same either way (<common/test_allocator.hpp>), so the only cost is one directory level. I'd lean toward keeping it, but it's a preference-level call and I'm open if others feel strongly.

Comment thread restructure-draft-v2.md
│ ├── quantiles_sorted_view.hpp / _impl exported by kll, quantiles, req
│ └── kolmogorov_smirnov.hpp / _impl user-called; compares two quantiles_sorted_views
│
├── internal/ datasketches::internal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal preference: I’d lean toward detail rather than internal. Both convey the intent, and detail keeps paths and qualified names a little shorter.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detail has good precedent (Boost, libstdc++), but I'd prefer to stay with internal. The saving is two characters per qualified name, and internal explains itself to someone reading a path or an error message without knowing the Boost convention. It also has solid C++ precedent in Abseil (absl/container/internal/) and Arrow (arrow::compute::internal), and it's the word Java developers already know (jdk.internal). Most of our contributors work in both languages, so a term that means the same thing on both sides helps with cross-language work. Unless reviewers have a strong preference otherwise, I'd like to keep internal.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants