Tuesday, January 17, 2017, 1:46:53 AM, Daniel Dekany wrote: > FM2 traditionally uses a weird naming convention, where directive > names are all-lower-case (like #elseif), and other names use snake > case (like ?upper_case or date_format). For a while it also supports > camel case (you just use it in the template, like ?upperCase, #elseIf, > etc., and it switches to that mode automatically). > > I belive camel case is the clear winner, because the names in the > data-model are almost always also use that, since in the Java world > that's the norm (also in the JavaScript world BTW). > > I propose that FM3 should only support the camel case variation. (Note > that this only affect the names defined by FreeMarker, not the names > coming from the data-model.) That yet again simplifies tooling too. > > Any thoughts?
Also, for the configuration setting names we should only support camel case too (FM2 supports both). Those are used outside templates too, like when you load the configuration from *.properties. Of course, if someone uses a snake case name, we would tell in the error messages that names are camel case since 3.0.0. -- Thanks, Daniel Dekany
