- 50 line comments containing type annotations in a strictly typed language and HTML
- 80 column limit
- single character variable names
- variable declarations inside loops
yeah ...
Edit: I like that people downvote without having counter arguments.
I don't love the variable declarations inside loops and hadn't noticed them, but even if I did, I don't have an opinion about them. Maybe they aren't good for performance? If so, well, then you have a point but I can't say. I'm not a Java expert, I'm not even using it very often.
My first point in the comment you replied was "don't dismiss it just because it's a language you don't like, it actually looks beautiful" and you are arguing that (correct me if I'm wrong) it's not beautiful at all. I wouldn't down-vote you, but it's obvious that we differ on taste. Maybe I should have said that "the beauty of the referenced code is very hard to match if you ignore your bias against a language and appreciate the stylistic choices" as you would probably also agree that it is at least very, very coherent.
Depends on the standards. A lot of language standards say to declare vars near where you use them. Does make syntactical analysis easier. See scoping and namespace rules.
If I'm a new contributor and just browsing the code I want to be able to stop on a line an understand what it roughly does just by reading that line without having to replay the whole execution stack in my head as required context.
I agree that the other issues are stylistic and are less important.
The algorithm might be beautiful but it's debatable for the implementation.
Other languages with other standards, yep, nasty.
Language wars are tiring, pedantic and really not part of this discussion on schedulers.
Or just standards at all.
I'm sorry but when you read lines like this:
> if ((i = (r - j) & m) >= 0 && i < n && (q = ws[i]) != null) {}
with 6 single character long variable names and 1 two character long variable name, there is something to be said about code quality.
And this is a rule that is true across programming languages.
This is a typical example of written once / never modified or single maintainer code and it's a bad practice, especially for open source projects.
If you really think something is wrong with it, post ideas for longer names that will clarify and not substantially impact density. I would probably conventionally use "n0" and "n1" instead of "m" and "n" to represent "n-1", "n" - but the usage he has is consistent throughout the file, which is more than I can say of my stuff sometimes.
What's wrong with variable declarations in loops?
- type annotations + HTML in comments - it is called javadoc
- 80 column limit - lowest common denominator for most people, also historically part of Sun code conventions for Java - http://www.oracle.com/technetwork/java/javase/documentation/...
- single character variable names - who cares, a symbol is a symbol
- variable declarations inside loops - more readable, no chance of referencing stale value outside of scope, and HotSpot will probably recompile anyhow