software-mansion / software-mansion/TypeGPU
feat: More infix operators
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
Currently implemented std operators include:
- arithmetic operators
add,sub,mul,div, (in the making)mod, - comparison operators
eq,ne,lt,le,gt,ge, - logical operators
not,and,or.
Out of these, currently only add, sub, mul, div have infix notation (d.vec2f().mul(d.vec2f())).
Which of these would we like to also make infix?
Regardless of the answer, we should probably rewrite the infix operators in some way so that std functions call the infix operators, instead of the infix operators calling the std functions.
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 surveying the existing std operators and their infix notation, including add, sub, mul, div, and the d.vec2f() example. Determine which comparison and logical operators should gain infix forms and clarify whether std functions or infix operators are the primary implementation. Done requires an agreed operator set and implementation direction.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100