Re:Nim vs. Crystal
by sweeneyrod on Thursday December 26, 2019 @01:22PM
(#21885617)
But using an existing parser that happens to be written in C could definitely be sensible.
[ Parent
| on HN ]
Yes, we do so for more complex formats like YAML and XML. However, for JSON, reimplementing is worth it for binary portability.
Re:Nim vs. Crystal
by imtringued on Thursday December 26, 2019 @02:15PM
(#21885958)
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.
Nim compiles to C, there is no cost in calling C.
Re:Nim vs. Crystal
by sweeneyrod on Thursday December 26, 2019 @04:24PM
(#21886913)
That's not how people use C libraries.
Re:Nim vs. Crystal
by SolitudeSF on Friday December 27, 2019 @05:09AM
(#21890345)
thats not how it works