About new table appending idiom
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 613
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
It help will help me reduce a lot of typing and typo error.
But I sometime use lua with other language like C# that count not from 1 but from 0. When create table that map with C# data with would be difficult with current idiom.
If idiom can be change for handle that case it would be great.
I think change to something like this would be better, handle more cases, more readable and distinguishable code. EX:
items #+= obj -- compile to: items[#items+1] = obj
items #= obj -- compile to: items[#items] = obj
items #-= obj -- compile to: items[#items-1] = obj
Thanks and regards!
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
Start by reviewing the existing table-appending idiom and how the issue's proposed operators would be parsed and compiled. Determine the intended behavior for zero-based and one-based indexing, then verify that the syntax remains readable and that the generated assignments work for each case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100