News for hackers. Stuff that matters.
Re:Classes vs. Data Structures by lalaithion on Monday June 17, 2019 @04:20PM (#20206911)
Those aren't implicit because the "public interface" is the Object List, not the Data Structure List.

    struct list {
      float node;
      struct list *next;
    }
Above is the data structure; it implies operations. Below is an interface (class, in the article); it implies data.

    #define LIST_H
    
    float index(struct list *ls, int i);
    int find(struct list *ls, float x);
    void sort(struct list *ls);

There are no comments on this comment yet.