• Skull giver
    link
    fedilink
    English
    08 months ago

    That’s not a comment, that’s a field. There’s a reason var comment = "Increments i by 1" isn’t how you comment in any programs.

    • @thebestaquaman@lemmy.world
      link
      fedilink
      0
      edit-2
      8 months ago

      Yes, it’s a field. Specifically, a field containing human-readable information about what is going on in adjacent fields, much like a comment. I see no issue with putting such information in a json file.

      As for “you don’t comment by putting information in variables”: In Python, your objects have the __doc__ attribute, which is specifically used for this purpose.