linksplatform / linksplatform/Data

Make TLink out of LinkType

Open
#116 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

https://github.com/linksplatform/Data/blob/dbb84e136c41b1054c6a9916152104947642f19a/cpp/Platform.Data/LinksOptions.h#L3-L11

 template<typename TLinkAddress = std::uint64_t, typename TLink = std::vector<TLinkAddress>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>, typename TReadHandler = std::function<TLinkAddress(TLink)>, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}> 
 struct LinksOptions 
 { 
     using LinkAddressType = TLinkAddress; 
     using LinkType = TLink; 
     using WriteHandlerType = TWriteHandler; 
     using ReadHandlerType = TReadHandler; 
     static constexpr LinksConstants<LinkAddressType> Constants = VConstants; 
 }; 

This change will reduce duplication in code and will make LinksOptions more adjustable by user.

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

Start with cpp/Platform.Data/LinksOptions.h at the linked lines and inspect how LinksOptions::LinkType and the related handler types are used elsewhere. Confirm the template change removes the duplication described in the issue while preserving existing type aliases and keeping dependent code compilable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.