4 ms·
I detailed the reasons at length in the issue thread. It might not be obvious if you haven’t seen the code examples, but once you see it, it’s pretty clear. I
by AlchemistCamp 3y ago
I detailed the reasons at length in the issue thread. It might not be obvious if you haven’t seen the code examples, but once you see it, it’s pretty clear.
I also completely disagree with your reasoning above.
The fact that many people believe or do some thing does not mean that “by definition” that that thing is not obviously stupid. E.g., inhaling glue, smashing things with one’s head, “the secret”, mukbang videos… the list is nearly endless.
Finally, “the principle” behind Prettier is also flawed when taken to the extreme they do. Paraphrasing my final comment on the github issue,
> It can be used to defend literally any styling choices, even ones that deliberately misaligned conditional branches with others at its logical level (much like prettier already is doing on a small scale in the example I referenced).
> Yes human beings are adaptable, but some things are easier to adapt to than others. It's objectively easier to spell Spanish than English, for example. It pays off to have consistency at a deeper level than simply making the same idiosyncratic choices each time an identical situation comes up.
- brlewis 3y agoTienes razon sobre el asunto de que uno puede escribir palabras mas facil en otras lenguas. Pero lo importante en este caso es que la gente encuentran lo que esperan. Si la mayoria de la gente buscan `} else {` sera mejor darles lo que esperan. Posiblemente una investigacion cientifica podia descubrir que `else {` seria mejor para los que ya no se acostumbraron a `} else {`, pero estamos en un mundo lleno de gente que ya se acostumbraron. Pues `} else {` sirve bien, lo mismo que sirve bien usar una lengua familiar aunque otra lengua tiene ventajas.
- brlewis 3y agoTranslation: You're right on the point that one can spell words more easily in other languages. But the important thing in this case is that people find what they expect. If the majority are looking for `} else {` it's better to give them what they expect. It's possible that a scientific investigation might find that `else {` would be better for those who haven't yet become accustomed to `} else {`, but we're in a world full of people who've already become so accustomed. So `} else {` still works better, just as it works better to use a familiar language even though another language has advantages.
- AlchemistCamp 3y agoThis confuses choosing a more phonetic option among multiple competing options with changing to a completely different language.
- brlewis 3y ago"Multiple competing options" ignores that there's a prevalent style already. https://github.com/prettier/prettier/issues/840#issuecomment-284168624 https://github.com/prettier/prettier/issues/840#issuecomment... Consistency has more value than the subjective advantage of the proposal that you're comparing to the objective advantage of being phonetic. I think the prettier maintainers made the right choice.
- AlchemistCamp 3y agoThere are multiple prevalent styles. The emoji counts on the issue thread you linked to and the number of essentially duplicates make that very clear.