Y
Hacker News
new
|
ask
|
show
|
jobs
by
sweeneyrod
2360 days ago
But using an existing parser that happens to be written in C could definitely be sensible.
2 comments
RX14
2360 days ago
Yes, we do so for more complex formats like YAML and XML. However, for JSON, reimplementing is worth it for binary portability.
link
imtringued
2360 days 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.
link
mratsim
2360 days ago
Nim compiles to C, there is no cost in calling C.
link
sweeneyrod
2360 days ago
That's not how people use C libraries.
link
SolitudeSF
2360 days ago
thats not how it works
link