News for hackers. Stuff that matters.
Re:Crafting Interpreters: Strings by c-smile on Monday September 24, 2018 @04:38PM (#18061192)
If strings are immutable in L0x then this string representation:

    struct sObjString {
      Obj obj;         
      int length;      
      char* chars;     
    };   
needlessly wastes 4 or 8 bytes for the chars pointer (among other heap management overhead related to separate allocations).

Instead, I think, you should have

    struct sObjString {
      Obj  obj;         
      int  length;      
      char chars[0];     
    };   
and allocate that string object as one chunk with its characters.
Re:Crafting Interpreters: Strings by munificent on Monday September 24, 2018 @04:47PM (#18061284)
Take a look at the first challenge exercise at the end of the chapter. :)
Re:Crafting Interpreters: Strings by c-smile on Monday September 24, 2018 @04:54PM (#18061364)
My pardon, hadn't got to that part at the moment of commenting.