Mama told me not to come.

She said, that ain’t the way to have fun.

  • 2 Posts
  • 275 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle












  • Use Lua, it uses one-based arrays. This is nice for a few reasons:

    • last element is array[length]
    • zero can be reserved for the type (especially nice for representing XML: 0 = node name, 1-N = children, named table entries = attributes)
    • very rarely see + 1 and - 1 in my code

    It feels wrong coming from C, but it’s actually really nice, especially since the reasons C does it don’t apply (i.e. index is just a memory offset).