Daily Crap 2008-05-30

  1. Consider my mind blown:

    struct vtable *Vector_vt = 0;
    
    int Vector_length(struct Vector *vector) {
      return vector->length;
    }
    
    void initialise(void) {
      ...
      Vector.vt = send(vtable, s.allocate, sizeof(struct vtable));
      send(Vector_vt, s.addMethod, s_length, Vector_length);
      ...
    }
    
    int length(struct object *object) {
      return send(object, s_length);
    }

    Hopefully I'll have read and understood enough soon to be able to write about and use their system. From the papers I've read already, I'm blown away. Regardless of how old the ideas are, they're new to me!


Comments

Click here to view the comments on this post.