Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
None, it's just convention.
But...
Usually, if you feel the need to write class names *that* long, you've probably, shall we say, deviated from commonly accepted good design somewhere along the way. -
C0D4669025yIf you need a stupidly long name to begin with, your already doing something wrong.
@highlight show a stupidlily long java list for our freind. -
hitko31455y@C0D4 The beauty of Java is that you can't import Create from package.create as PackageCreate, so people name their class PackageCreate to avoid collision with TemplateCreate. Add a few levels and you get names like CustmerClientPackageCreateVisitorCallback, BackofficeClientPackageCreateVisitorCallback,
CustmerAPIPackageCreateVisitorCallback, ... It's a total bullshit design, but short of using dot-notation with full package name everywhere there's really not much to do about it (except for ditching Java). -
@M1sf3t
JavaScript is the one place I support pluralized naming. Since it's do loosely typed, doesn't define returns, and documentation is hit or miss at best, it's nice having the function name tell you if you're getting a value or an array. -
@M1sf3t once again, JavaScript so I disagree. Name tells you what it's doing, what is getting returned, and what it needs. It's long, but in a language that's already fighting against you, I appreciate the help.
-
@M1sf3t
Date object has 19 methods start with get.
getOwnPropertyDescriptors() exists in the root Object.
JQuery contains .get(), .getJSON(), and .getScript()
Those are the common, mundane ones. There's no telling how many JS functions people have written that start with get and don't return an element. -
blol585yIn case sensitive languages underscores do not really add any value most of the time since you can make names readable (and shorter) using camel or pascal casing.
Related Rants
Explain to me like I'm retarded why underscores are not desirable in a java class names besides, it's not the common convention.
Context:
FooBarLongClassName_OtherClassNameVisitor for a visitor class. This is the name of a class
question
class
java
visitor
naming