amber-lang / amber-lang/amber

[Feature] Reduce the use of subshells in our language

未關閉
#899 0 則留言 1 個 reaction 已指派 1 人 已被 @Ph0enixKM 認領 在 GitHub 檢視
主要語言
Rust
星號
5.2k
分支
145
平均合併
5 天 3 小時
30 天內合併 PR
7

描述

**Is your feature request related to a problem? Please describe.**
Subshells reduce the script performance dramatically. This is because they have to create a fork and duplicate a context, the script is compiled with. For this very reason avoiding them can be beneficial

**Describe the solution you'd like**
Reduce the use of subshells for things that don't need to be handled by a subshell call:
- [ ] Range operator could use brace expansion `{1..10}` or `eval "{1..$var}"` for expansions with variable bounds.
- [ ] Ternary operator could be just an `if..else` statement that just assigns variable in each branch
- [ ] `Text` comparison could be just an `if..else` statement that just assigns variable in each branch
- [ ]

**Additional context**
#867

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。