software-mansion / software-mansion/TypeGPU
[RFC] feat: Infix op shorthands
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
This idea come to me during Konrad's live-coding session. Seems useful, but I am not 100% sure about it.
const uv = d.vec2f();
// before:
uv.add(d.vec2f(1, 0))
// after:
uv.add(1, 0)
It seems nice for small arguments, but could get confusing for larger strings of expressions
uv.add(d.vec2f(time.$ * 20 + 0.543, time.$ * 50 + 0.122))
// after:
uv.add(time.$ * 20 + 0.543, time.$ * 50 + 0.122)
Contributor guide
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
Start by locating the TypeGPU vector-operation API and its existing tests; no file or entry point is named in the issue. Compare the current explicit vector-argument calls with the proposed shorthand, then establish whether the behavior is sufficiently clear for both simple and longer expressions before defining completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100