sparkfun / sparkfun/SparkFun_External_EEPROM_Arduino_Library

Return type of put and get.

Open
#36 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
67
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Subject of the issue

Just wondering why the return type of put is T&? (same for get).
I don't really see why these functions return the value we feed them with.
I wonder if it wouldn't make more sense to have put return the next writable location, kind of like putString.
That way, it would become possible to save structs one after another, by using the returned value as the next address.
Perhaps it would also make sense if get just returned void.
What do you guys think?

Your workbench
  • Not relevant.
Steps to reproduce

Not relevant.

Expected behavior

Not relevant.

Actual behavior

Not relevant.

Contributor guide

No contributing guide indexed for this repository

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 the put, get, and putString API entry points but no files or tests. Start by locating those declarations and reviewing the current return-value contract; an agreed API change and its expected behavior would define done.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp
Domain
api, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.