Skip to content

Provide clearer documentation as to the logic-less advantage of Dynamic Names? #148

@chrisdotcode

Description

@chrisdotcode

Hi all,

After discovering the optional Dynamic Names feature (the README documentation also needs updating, by the way: it currently states that "at present, the only module being described as optional is regarding support for lambdas", which is no longer correct), and reading the documentation in the ~dynamic-names.yml file itself, I came away with the conclusion that it was an unnecessary addition to the language: that you had to munge up your data with extraneous dynamic names for something that already could be solved with if/elses.

However, the biggest pro for Dynamic Names - the one that defeats the above argument, and a con not documented in the if/elses section - is the fact that including a bunch of if/elses inside mustache templates is inherently logic-ful, not logic-less. Since ~dynamic-names.yml only implies this and never mentions it explicitly, I believed that Dynamic Names were a misfeature. However, after reading #54, I came across this comment, which explicitly states the above: one of the advantages of logic-less templating is the lack of logic (duh), and Dynamic Names removes logic from the templates entirely. Interestingly enough, that con is presented for lambdas, but is missing from the if/else section. The pro of Dynamic Names adhering to the logic-less ethos - which as I again believe is the biggest advantage they have over other implementations - is likewise missing from its details.

I think it would be worthwhile to explicitly document the above in the ~dynamic-names.yml file. Can I go ahead and make a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationhuman-oriented text could be improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions