4
Vote

Less scary-sounding API

description

Consider renaming scary-sounding method names like "CreateAnonymous" to simply "Create".

comments

baxevanis wrote Mar 23, 2012 at 1:50 PM

One thing to concern is that both names will exist in the API (just that the CreateAnonymous will get deprecated). That may cause a little confusion, isn't it?

baxevanis wrote Mar 23, 2012 at 1:50 PM

(Unless this is a breaking change.)

ploeh wrote Mar 23, 2012 at 2:09 PM

I was thinking of phasing the old name out by deprecating it...

baxevanis wrote Mar 27, 2012 at 2:56 PM

For such cases, the hardest part is to find a good message for the attribute. :)

baxevanis wrote Jun 23, 2012 at 9:19 PM

From a test reader's perspective, renaming to "Create" might change the semantics of the relationship with the Anonymous Variables article (http://blogs.msdn.com/b/ploeh/archive/2008/11/17/anonymous-variables.aspx). (Or no?)

ploeh wrote Jun 24, 2012 at 8:01 AM

Agreed. Renaming the method changes the semantics. However, one could argue that simply the fact that a unit test is using AutoFixture creates a context where it's given what "Create" means.

In any case, I've heard plenty of feedback stating that "CreateAnonymous" is a barrier to adoption simply because it sounds unfamiliar. If that's true, changing the name would be a good trade-off.

baxevanis wrote Jun 24, 2012 at 12:06 PM

Surely a good one, yes!