How to name factory like methods?

Viewed 59565

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?

11 Answers

I like new. To me

var foo = newFoo();

reads better than

var foo = createFoo();

Translated to english we have foo is a new foo or foo is create foo. While I'm not a grammer expert I'm pretty sure the latter is grammatically incorrect.

Related