DEV Community

Discussion on: My Review of Nginx

Collapse
cyberhck profile image
Nishchal Gautam

All the other points are good, but ugly syntax isn't something I'd agree with, you must be using language which uses indentation, it's their syntax, learn and live with it, others find indentation and lack of curlies ugly

Collapse
yujiri8 profile image
Ryan Westlund Author

I don't agree that all matters of syntax are subjective. For example, what if a language required ;;;; after a line, or the use of two tabs as indentation? I think we can agree that some syntax rules can be objectively worse than others.

In general, my case against semicolon line continuation is that since line continuation is needed on a minority of lines, it is better to have a syntax that requires an additional character for continuing than an additional character whenever a line ends.

Part of the reason I favor indentation in general is that we always want to indent our code anyway when we use a language that doesn't need it.

Collapse
cyberhck profile image
Nishchal Gautam

You can disagree, in this case of nginx, I like the syntax, and I know many who do, and I know many who don't, it's calles syntax for a reason, it's rules for that particular domain,

Now what I hate is optionals if a semi colon is optional, that's the worst, either require it, or throw error if there's one present.

You don't require semis for sure, but calling it ugly because a language requires is just plain wrong, it's subjective

Thread Thread
yujiri8 profile image
Ryan Westlund Author

I agree on optional semicolons; those bother me the most. I don't agree that aesthetics are purely subjective, and I gave some examples that I think illustrate why, and explained why I think not having semicolons is better. In fact it seems a bit ironic to me to say "that's plain wrong, it's subjective".