-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always use dash instead of underscore for commands #1501
Conversation
Calling for a vote @mojolicious/core. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I do not quite see the purpose of https://github.com/mojolicious/mojo/pull/1501/files#diff-3bdbac1ce4a8f86842eab030329d0633R82 I do think that defaulting to a dash is more natural than using the underscore. Bonus feature that both work.
👍
9cc3855
to
863f97b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commandline programs much more commonly use dashes so this makes sense, as it did in #1372. This addresses the potential for confusion by printing them consistently and not doing the translation on the first character. So I vote 👍
I'm glad that both versions still work. Dashes look nice. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳👍
Just for the record, I vote against. |
Why do you vote against @CandyAngel? I'm neutral. It looks better, but I'm not sure if it's worth the change. (Not opposed though) |
My opposition is that this introduces complexity, change and risk for no/little gain. Existing documentation (tutorials, blog posts, user documentation) now look different from what Mojolicious outputs (confusing for newbies). You can use dashes.. except for the first character (more edge cases to consider)[1]. If a problem with this is discovered and it gets reverted, that will then be a breaking change. I would say I would prefer it if dashes worked as well (almost like a hidden feature for power users?), but that still means that what gets written in user documentation could depend on the author preference, rather than the "actual way" Mojolicious uses commands (which is neither complicated from a developer point of view, because it's just a module name, or from an end user point of view, because it's shown to you). Normally these things are balanced out by the improvement but it doesn't seem worth it to me for a minor cosmetic change. [1] Case in point, the PR title is wrong, because it doesn't "always use a dash instead of underscore" |
Hello. I've been lurking on the sidelines of the project for a while, as I struggle to muster the familiarity, knowledge, ability and courage to effectively contribute. So I realise I'm not qualified to weigh in on this, except to put forward the perspective of the newcomer, whose plight seems to form the bulk of the argument against the change. I believe the use of hyphens appears more modern / standardised, and in my experience suits general taste more widely. It's adoption might not win any new followers, but its absence might deter them... Personally, I was disappointed when I first encountered underscores, considering it an indicator of style for the project as a whole, and foreseeing the frustration of frequent typos in my future. During the early stages of researching and thinning down alternative tools, such trivialities can count for more to the newcomer than they do for someone already convinced of the tool's merit (as with website snazz). As the number of alternatives in the marketplace increase, the filtering criteria in the early stages become increasingly superficial. For this reason, I would count this amongst those barriers to adoption that alone might not deter a new user but that in combination with others very well might. I hope it isn't out of place for me to volunteer the above. |
Simple proposal. All commands now look like
mojo generate lite-app
instead ofmojo generate lite_app
. And the command list will also only show the version with dash. Both variants still work though.