Skip to content

Describe default sentinels accurately - #129

Open
quinnj wants to merge 3 commits into
mainfrom
claude/sentinel-docs
Open

quinnj wants to merge 3 commits into
mainfrom
claude/sentinel-docs

Conversation

@quinnj

@quinnj quinnj commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The SentinelArray docstring and README say isbits element types get "a random/reasonable sentinel" and that integer sentinels are random. In fact the default sentinel is the value with all bits set: -1 for signed integers, typemax for unsigned integers, a NaN for floats. A random sentinel is only picked when setindex! stores the current one. This is the documentation half of #17, which was surprised that SentinelArray([-1, -1, -1]) is all missing.

  • State the real defaults, and say that wrapped elements equal to the sentinel read as value.
  • Keep the integer caveat, but say random sentinels are replacements.
  • README: actual CI matrix (Julia 1.3, latest and nightly on Linux; latest on 32-bit Windows) instead of "1.0 ... on Linux, OS X, and Windows".
  • Fix the typeof(value} typo and the Bool constructor error message (Array{Union{Bool, Missing}}).

Stacked on #122, which edits the same docstring; merge after it.

Verification: default sentinels and the [missing, 2] example were checked on Julia 1.12.6; full suite passes on this branch.

🤖 Generated with Claude Code

quinnj and others added 3 commits September 22, 2026 09:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs said isbits element types get a random sentinel and that integer
sentinels are random. The default is the all-ones bit pattern (-1 for
signed integers, typemax for unsigned ones, a NaN for floats); a random
sentinel is only chosen when setindex! stores the current one. Also fix
the README's CI matrix and two typos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant