3 ms·
I don't refrain from doing that because someone told me that C is horrible and too low-level. I refrain from doing that because I have tried it in the past, and
by Wilya 14y ago
I don't refrain from doing that because someone told me that C is horrible and too low-level. I refrain from doing that because I have tried it in the past, and while it works perfectly fine, it is horribly slow to write. There isn't really any compelling reason why you should spend time ironing the details and memory usage of one lone HTTP request when you could just do 'body = http_get url' and be done with it.
You can do a ton of things in C. But it takes time, a lot of it. And sometimes, it's worth sacrificing a few Kb (well, okay, Mb) of memory usage to save time and do a program that does a little more.
Don't get me wrong, there's a ton of things I would never do with anything else than C (image processing in C is just so absurdly faster than in any other language, even when you're just calling C libraries). But there's room for higher languages, because between libcurl and libxml, there's a ton of glue code that is way simpler to write in Ruby.
- betterunix 14y ago"image processing in C is just so absurdly faster than in any other language, even when you're just calling C libraries" Hm... https://news.ycombinator.com/item?id=1390944 https://news.ycombinator.com/item?id=1390944 I'm not saying this is representative, but you did bring up image processing.