Skip to content

feat: add unsafe initialiser#12

Merged
tmcdonell merged 2 commits into
mainfrom
feat/unsafe-init
Jan 26, 2026
Merged

feat: add unsafe initialiser#12
tmcdonell merged 2 commits into
mainfrom
feat/unsafe-init

Conversation

@tmcdonell

Copy link
Copy Markdown
Contributor

Summary

Adds the initialiser equivalent of Array(unsafeUninitialisedCapacity:initialisingWith:). Useful if you want to initialise all the values in parallel, for example.

@JaapWijnen

Copy link
Copy Markdown

Any tests for these?

@tmcdonell

Copy link
Copy Markdown
Contributor Author

Any tests for these?

Indirectly. All the initialisers get routed through this method.

@tmcdonell

Copy link
Copy Markdown
Contributor Author

Updated to use american english spelling of "initialise", to match existing APIs.

Comment thread Sources/MultiArray/MultiArray.swift
This switches to the american spelling of initialise, to match the
spelling of the existing Array initialiser that this mimics. *sigh*

For internal consistency this also changes some (internal) functions to
use american spelling as well. Although these are marked as public, that
is due to Swift modularity limitations and they are actually internal
functions not intended to be used outside this module, so this is not a
breaking API change.
@tmcdonell tmcdonell merged commit b12a775 into main Jan 26, 2026
3 checks passed
@tmcdonell tmcdonell deleted the feat/unsafe-init branch January 26, 2026 13:25
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.

3 participants