Re:Facebook is using D in production starting today
by howeman on Friday October 11, 2013 @02:09PM
(#6534820)
Go can do unsafe memory access, can't it? See http://golang.org/pkg/unsafe/
[ Parent
| on HN ]
Re:Facebook is using D in production starting today
by georgemcbay on Friday October 11, 2013 @03:37PM
(#6535426)
Go can do unsafe memory access, but doing things like pointer arithmetic or casting of a memory blob to an arbitrary struct type is way more painful than it is in C/C++.
In a lot of contexts, this is a feature (makes terrible code smells in normal code easier to see), but depending upon the type of coding you do, you do sometimes find yourself wishing it were a bit easier when dealing with things like graphics APIs where you just want to lock a texture, update some bits in-place, and then unlock it. Sometimes what might be a couple lines of C code are 10s of lines of Go code where you either do crazy gymnastics with the unsafe package, or juggle things in and out of byte buffers.