Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ROOT does this with its own preprocessor and custom comment decorators. like:

    class mydata
   {
       
        /* simple type */
        int n; 

       /* the following array is of length n */
        double  * v; //[n]       

      /* don't serialize the following */ 
      int reference_count; //! 

     ClassDef(mydata,1) ; // this macro does some magic, 1 is the version number etc.
   };


Didn't know that. But after seeing this: I vastly prefer a streams based orientation then. No magic, no comments.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: