Am 2019-03-03 um 19:29 schrieb Claude Brisson:
Thanks for the diligent feedback.


Going through the notes makes make stumble upon this:
Added a new 'parser.allows.dash.in.identifiers' boolean property (false per default) to (dis)allow '-' in reference identifiers . Fixes VELOCITY-542.

I see a few issues here:
* The property name is awkward. Where is the hierarchy? Shouldn't it rather be 'parser.allow_dash_in_identifiers'? (Applies to VELOCITY-904 too). * '-' U+002D is *not* a dash. It is a hyphen (minus). A lot of people get and do it wrong. I would strongly recommend to fix that typographic issue /before/ 2.1.

So the new property should be named "parser.allow_hyphen_in_identifiers".

Looking at the current state of our runtime properties names, I see that there are many inconsistencies:

 - '.' is used many times as a word separator instead of a hierarchical separator  - sometimes there is no word separator at all, as in "resource.manager.logwhenfound"  - sometimes we use CamelCase, as in "resource.loader.modificationCheckInterval"

I have noticed that too actually. I always wondered about this quirk:

resource.loader = file,classpath,etc.
file.resource.loader.path = ...

instead of
resource.loaders = file,classpath
resource.loader.file.path = ....

Maybe it's time to homogenize all this. Old property names will of course still be available via a deprecation mechanism.

Absolutely, yes. Deprecate in 2.1, replace in 3.0.

Any preference between underscore_word_separator and CamelCase?

My general rule of thumb is: if you have more than one element beneath, use the period, e.g, if there is sothing else besides the 'loader' in 'resource' otherwise it should be resource_loader.

I do not have any strong prefecence of either format, but I think that snake case (with underscores) and periods reads better. Regardless which pattern will be applied, it has to be consistent throughout.

Is this list complete? http://velocity.apache.org/engine/2.0/configuration.html

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to