3 ms·
There's plenty of non-trival code written in C as well. That's not a good argument for the benefit of a programming language. You can work around any limitati
by wvenable 5y ago
There's plenty of non-trival code written in C as well. That's not a good argument for the benefit of a programming language. You can work around any limitation with enough work -- this article is a perfect example. It's an ugly solution to a simple problem but it works.
- sam0x17 5y agoC has few enough restrictions though that you can for example make a struct and then make an array of that struct. In Go this is like rocket science.
- pphysch 5y agoWe're never going to get to Mars if `arr := [100]myStruct` qualifies as rocket science.
- hactually 5y agoWhich one are you struggling with? https://play.golang.org/p/P8L0lSMhNgF https://play.golang.org/p/P8L0lSMhNgF https://play.golang.org/p/E8rM7JdrfkD https://play.golang.org/p/E8rM7JdrfkD
- sam0x17 5y agoSorry, meant to say some other data structure, say, a hash table where the key is some custom type / struct and the value is some custom type / struct. Or a binary search tree. Or a linked list.