Re:Go makes it easier to write correct, clear and efficient ...
by i_phish_cats on Friday May 10, 2019 @04:23AM
(#19876062)
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.
[ Parent
| on HN ]
Re:Go makes it easier to write correct, clear and efficient ...
by codr7 on Friday May 10, 2019 @04:48AM
(#19876154)
There'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.
[dead]
Re:Go makes it easier to write correct, clear and efficient ...
by codr7 on Friday May 10, 2019 @05:26AM
(#19876291)
Like 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?
Re:Go makes it easier to write correct, clear and efficient ...
by wtetzner on Friday May 10, 2019 @06:27AM
(#19876529)
> How is it more verbose than C++, Java, Rust or Swift?
All of these languages have generics.
Re:Go makes it easier to write correct, clear and efficient ...
by codr7 on Friday May 10, 2019 @08:07AM
(#19876959)
Indeed.
The parent post was calling out Go for being overly verbose and explicit compared to alternatives. I was simply making an example to the contrary.
Re:Go makes it easier to write correct, clear and efficient ...
by camdenlock on Friday May 10, 2019 @05:10AM
(#19876242)
I 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.