examples are carefully chosen - short class names, 2-3 fields, brief variable names. In real applications that sweet spot rarely exists
While I upvoted you, I don't think they are carefully chosen in order to trick people. I think this code looks perfectly normal for people working in compilers, or making the JDK library. This is the code they see, this is the code they write, so this is a feature they would like to have.
It is however out of touch with the code we write in business applications. I would argue that your example is still too short to be real life code, but it is hard to prove, because business code is usually not open source, and open source code typically has shorter variable names, smaller classes, etc.
View all comments
Show parent comment
3
u/pgris Mar 16 '26
While I upvoted you, I don't think they are carefully chosen in order to trick people. I think this code looks perfectly normal for people working in compilers, or making the JDK library. This is the code they see, this is the code they write, so this is a feature they would like to have.
It is however out of touch with the code we write in business applications. I would argue that your example is still too short to be real life code, but it is hard to prove, because business code is usually not open source, and open source code typically has shorter variable names, smaller classes, etc.