▲ | guappa a year ago | ||||||||||||||||||||||||||||||||||
Go is very boilerplate. It requires at least 3 lines of error checking every 1 line of actual code. Also it doesn't have packed structs so it's completely incapable of doing low level networking or to handle binary files (you can of course do all the bitwise operations yourself… but is it sensible to use a language that is more error prone than C in 2024?). Also due to its lack of A LOT of system calls, you will need to use modules written by someone on github, which will happily segfault if you look at them funny. So now you have hidden memory management! Fun! Of course if all you do with go is a glorified jq script… sure then it's kinda fine. | |||||||||||||||||||||||||||||||||||
▲ | mrbadguy a year ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
I’m not sure I understand the packed structs complaint. I have used Go to read binary data and it’s quite easy. You just need to ensure that all of your struct fields have fixed sizes e.g. int32 or [4]int64 or whatever. Unless I’ve misunderstood what you mean? | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | dfawcus a year ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
How low level a networking use do you desire? I certainly managed to use it to implement a protocol over UDP without any issues, that having byte and bit packed values. Or do you wish to have something similar to C with structs and (endian dependent) bitfields overlaid on packet buffers? | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | underdeserver a year ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
I worked on a project with gopacket. It was completely fine. | |||||||||||||||||||||||||||||||||||
|