Imperative pipelines (“tap” operators)
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 601
- Forks
- 74
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
Some languages provide pipeline operators or alike for use with imperative functions/methods:
- Clojure provides
dotothat works like->, except that each forms are evaluated and discarded, and the original value is returned. For example,(doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))initiates a Java mutable hash table (see the ClojureDocs page). - In Kotlin,
.apply(with receiver) and.also(with argument) are available as extension methods on objects (see Kotlin scope functions). - (Unfortunately, I couldn’t find a precedent on a
.- or|>-like tap operator.)
This operation is also known as “tap” or “tee”. Is this a useful addition to Rhombus?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by comparing Rhombus's existing pipeline facilities with Clojure's doto and Kotlin's apply/also semantics, then determine whether a tap operation fits Rhombus and what syntax and behavior it would require. Done would mean an agreed feature direction and an implementation scope.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100