sindresorhus / sindresorhus/Defaults

Support tuples

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Swift
Stars
2.5k
Forks
163
PR merge metrics
No merged PRs in 30d

Description

It would be useful to be able to store a tuple with element of any of the supported types. The tuples would simply be stored as array, so we could just reuse the array bridge.

This will not be possible until Swift has variadic generics and we can conform tuples to protocols.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; start by reviewing the existing array bridge and the current Swift limitations around variadic generics and tuple protocol conformance. Done would require a supported way to store and retrieve tuples containing supported element types, with coverage showing the tuple round-trips correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
desktop-dev, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.