Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 4458 days ago | link | parent

Sounds like a "feature" of templates to me, just like a nil value in a table deleting its key is a "feature."

...In fact, isn't it just the same thing? I'm not so familiar with templates, but you're using 'write-table, which will presumably take a table, which will supposedly omit any nil fields. When you read it again, the field won't be there, and what purpose is there to having a default if not to use it now?



1 point by akkartik 4458 days ago | link

I won't quibble about names :) Let's just agree that templates initializing unspecified values to defaults interacts poorly with tables deleting nil values.

-----

1 point by rocketnia 4457 days ago | link

Yeah, I guess that's something we can agree on. No use having a serialization mechanism that thinks the stored version of the value is just a suggestion. :)

Until now, I was thinking this was potentially a positive (albeit an inconsistent positive) since it was a convenience to anyone who wanted to manually edit pickled values, as might happen with a configuration file or something. That doesn't seem nearly as crucial a feature as serialization, and from the looks of your 'temstore utility, it might even still be possible.

-----