Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSON is actually implemented entirely in Crystal for Crystal, I'm pretty sure it's the same for Nim too.

For a language which claims to be fast, having to use a C-based JSON parser would be a bit of a cop-out :)



But using an existing parser that happens to be written in C could definitely be sensible.


Yes, we do so for more complex formats like YAML and XML. However, for JSON, reimplementing is worth it for binary portability.


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.


That's not how people use C libraries.


thats not how it works


it still compares algorithm implementation, not the language speed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: