Naming: Bake vs Dump

Say you have some sort of structure(represented as a lua table or many lua tables), and you want to convert this structure into its string representation (this requires special work and is specific to the structure’s type)
Would you call the method that returns the string representation Bake or Dump? Or would you do something else entirely?

1 Like

Dump would be suitable if it’s only meant for debugging and/or the string is expected to be very long. ToString or just String could used if you’re going to display the result in a log.


Is it for debugging? Dump.

Is it for display? Display/String.


I’d skip the custom method and just convert it to JSON, personally.

If you can’t do that, or need the extra function for some extra processing, ToString has my vote.