Hacker News new | ask | show | jobs
by barsonme 3471 days 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 :-)
1 comments

If you consider googling it too: http://wiki.c2.com/?ShlemielThePainter