News for hackers. Stuff that matters.
Re:I Just Can't Kick Lisp by kazinator on Friday October 07, 2022 @05:48PM (#33127289)
Firstly, that needs a rewrite in some non-sucky curly brace with pointers:

  Edit_Array buffer_batch_array_from_linked_list(Arena *arena, Batch_Edit *batch, i32 count)
  {
      Edit_Array result(arena, count);  // Edit_Array has this thingy called a constructor
 
      foreach (node in batch)      // Batch_Edit * is somewhere/somehow declared iterable
      {
         if (result.full())        // Edit_Array has internal fill index, checked against count
           break;
         result.add(batch->edit);  // Edit_Array has method to add and increment fill index.
      }

      return result;  // not a function, drop the parens
  }
The Edit_Array class in the original is of no help whatsoever. Like this coder or language aren't even up to abstract data types with Modula-2.

There are no comments on this comment yet.