Hello community,
I wanted to try using packedjson, but I ran into this error:
Error: undeclared identifier: 'shallowCopy'
https://forum.nim-lang.org/t/6549#40506
shallowCopy and shallow might not do "shallow copies" anymore. Instead use system.move if you can or implement a copy-on-write datastructure.
So I assume packedjson will not be updated to fix this — or will it?
@Araq, am I understanding correctly that packedjson is more of a proof‑of‑concept, and that it’s generally recommended to use something like jsony or another maintained library instead?
thanks
What are you talking about, packedjson supports arc/orc and compiles with Nim devel.
Here is what it does:
when defined(gcArc) or defined(gcOrc):
x.t[][i] = move x.t[][i+diff]
else:
shallowCopy(x.t[][i], x.t[][i+diff])
Which is appropriate. I think your problem here is a weird Nim configuration or installation.
Which is appropriate
in recent nim versions, is this still needed? ie wouldn't move have similar semantics?