aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hacking.md
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-02-11 19:27:09 +0100
committerbptato <nincsnevem662@gmail.com>2025-02-11 20:18:02 +0100
commit13064b08f22519eaf928888f2a2f1de5a8414d75 (patch)
treebef984c8760bf21c1b7d74a13d06853dbac56336 /doc/hacking.md
parente6f13f7e62e0dcd0437b45f3e4102768b5df737b (diff)
downloadchawan-13064b08f22519eaf928888f2a2f1de5a8414d75.tar.gz
Update docs
Diffstat (limited to 'doc/hacking.md')
-rw-r--r--doc/hacking.md17
1 files changed, 0 insertions, 17 deletions
diff --git a/doc/hacking.md b/doc/hacking.md
index 6e1af1d8..93f5f7a3 100644
--- a/doc/hacking.md
+++ b/doc/hacking.md
@@ -89,12 +89,6 @@ Exceptions don't work well with JS embedding; use Result/Opt/Option
instead. Note that these kill RVO, so if you're returning large objects,
either make them `ref`, or use manual RVO (return bool, set var param).
-#### "result" variable
-
-The implicit "result" variable is great until you need to change the
-procedure signature or manually inline a proc. Avoid it when possible,
-except in short accumulator-style procedures.
-
#### Implicit initialization
Avoid. The correct way to create an object:
@@ -144,17 +138,6 @@ proc foo(objs: openArray[SomeObj]) =
obj.i = i
```
-#### Generic parameters for JS values
-
-Monoucha (our QuickJS wrapper) supports these, but they bloat code size
-and compile times.
-
-Similarly, `varargs[string]` works, but is less efficient than
-`varargs[JSValue]`. (The former is first converted into a seq, while the
-latter is just a slice.)
-
-Use `?ctx.fromJS(val, res)` on JSValues manually instead.
-
### Fixing cyclic imports
In Nim, you can't have circular dependencies between modules. This gets