3 ms·
I'm not sure I 100% understand your question, but in Go a string is a two-word struct. type string struct { data unsafe.Pointer len int
by barsonme 10y ago
I'm not sure I 100% understand your question, but in Go a string is a two-word struct.
type string struct {
data unsafe.Pointer
len int
}
The C version would be
typedef struct string {
const *char data;
int len;
} string;
Edit: oh, ok. I Googled the "painting algorithm" reference. I swear I had read that before :-)
- Someone 10y agoIf you consider googling it too: http://wiki.c2.com/?ShlemielThePainter http://wiki.c2.com/?ShlemielThePainter