I guess that most factory-like methods start with create
. But why are they called "create"? Why not "make", "produce", "build", "generate" or something else? Is it only a matter of taste? A convention? Or is there a special meaning in "create"?
createURI(...)
makeURI(...)
produceURI(...)
buildURI(...)
generateURI(...)
Which one would you choose in general and why?
createXyz()
.create
prefix as a matter of convention for the sake of API consistency and also because just typing the letterc
would cause all of them to show up in the IDE's auto-complete, which would make it easier for someone trying to learn what's available. I could've hadMatrix4f.identity()
,Matrix4f.transpose()
, etc. but they'd be faster to find asMatrix4f.createIdentity()
andMatrix4f.createTranspose(...)
, etc.