Hacker News new | ask | show | jobs
by i_phish_cats 2744 days ago
My first Go project was a PDF parser. Rewrote it in C a similar number of lines because Go's capacity for polymorphism is as primitive as in C.
2 comments

Can you explain more about why you re-wrote?

You seem to have said you rewrote from Go because it has poor polymorphism, into C which is equally bad in this regard.

If you find some language feature important, surely you would not rewrite into a language that doesn't have that feature?

C is equally bad, but it can be used anywhere -- it can be compiled into a dynamic lib and used in any language/framework, which is exactly what we did.
True, though that doesn't seem like a good reason to rewrite it in C. A PDF parser in C sounds like a security nightmare, and now you have to deal with C's archaic build systems.