Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sweeneyrod
· 6y ago · 0 comments
But using an existing parser that happens to be written in C could definitely be sensible.
Comments
[–]
RX14
6y ago
Yes, we do so for more complex formats like YAML and XML. However, for JSON, reimplementing is worth it for binary portability.
[–]
imtringued
6y ago
That sounds like a pretty awful idea. If you're using a C library for parsing JSON then you must add an additional C to Nim/Crystal conversion step that requires additional RAM and CPU time.
[–]
mratsim
6y ago
Nim compiles to C, there is no cost in calling C.
[–]
sweeneyrod
OP
6y ago
That's not how people use C libraries.
[–]
SolitudeSF
6y ago
thats not how it works