4 ms·
I wrote a PDF parser in golang a few years ago and it was an extremely unpleasant experience. No polymorphism means I essentially have to cast everything to voi
by i_phish_cats 7y ago
I wrote a PDF parser in golang a few years ago and it was an extremely unpleasant experience. No polymorphism means I essentially have to cast everything to void* aka interface{}. Rewrote it in C (the rewrite was quite easy actually) which at least made the lib accessible to other languages.
- codr7 7y agoThere's plenty of polymorphism in Go, that's what interfaces are for. In C you would typically use a struct stuffed with function pointers, how is that an improvement? Its still a better C in many ways, strings and character sets is a big one.
- pishpash 7y agoIt's definitely a better C, but that's about it. Let's not kid ourselves. It's in many ways a language stuck in the past, for senile people, OCD's, or drones who are forbidden to produce non-uniformity and who want everything verbose and explicit.
- camdenlock 7y agoI kinda think /you/ are kidding yourself by making such wild assertions. I certainly do not agree with them, and I see no clear evidence to support them. There are different languages for different tasks. Tradeoffs abound. Pick the right tool, that’s all.
- codr7 7y agoLike C, you mean? How is it more verbose than C++, Java, Rust or Swift? You're not making much sense here, why do you feel so threatened?