Would user polls be useful? (Was: Re: std.unittests [updated] for review)
Jonathan M Davis
jmdavisProg at gmx.com
Tue Feb 1 05:44:32 PST 2011
On Monday 31 January 2011 15:49:11 Jens Mueller wrote:
> spir wrote:
> > On 01/30/2011 01:13 PM, Jens Mueller wrote:
> > >I do not like putting it in std.exception. Maybe the name std.unittest
> > >is also not good. I would propose std.assert if assert wasn't a keyword.
> > >[...]
> > >
> > I would_not_ expect helpers for writing
> >
> > >assertions (Assert_Error_) in a module named std.exception.
> >
> > Same for me. Find it strange. Would never search assertion helper
> > funcs inside std.exception. Why not std.assertion? std.unittests
> > would be fine if there were some more stuff in there, I mean not
> > only assertions. Else, the obvious name imo is std.assertion.
>
> Nice. I just wonder what others think.
> I'd like to start a poll
> http://doodle.com/vn2ceenuvfwtx38e
> In general are those polls useful? I mean there where some
> discussions in the last time where a poll may help. git vs. hg. 80 vs.
> 90 characters per line. If all arguments are on the table it can be
> useful to have an opinion poll to finally settle the discussion.
>
> It may even be that I'm totally wrong here. But I think the module
> naming needs to be done very careful. It's what a D newcomer needs to
> grasp as easy as possible. Am I too picky? Somehow I care (too?) much
> about names.
I wouldn't actually be looking for "assertion helpers" anywhere. I might be
looking for unit test helper, but I wouldn't be thinking about assertions at
all, even if the unit test helpers threw AssertError like they do. But truth be
told, I don't generally look for modules with a particular name unless I know
what I'm looking for. I look at the list of modules and see which names seem
like they'd have what I'd want. As such, std.unittests would make me think that
the module held unit test stuff, whereas I really wouldn't know what to expect in
std.assertion or std.exception at all - _especially_ std.assertion.
However, given the small number of unit test functions, it makes no sense for
them to be their own module. So, I really don't think that std.unittests makes
sense at this point. std.exception may not be the best name, but given what's
currently in it, the unit testing functions fit in there reasonably well. So, the
issue then is what to name std.exception if that name is not good enough.
std.assertion makes no sense - particularly with enforce in there - and
std.unittests doesn't work, because it's not just unit testing stuff in there.
So, unless you can come up with a better name for std.exception with the idea
that it's going to be holding my new functions along with what's already in
there, I don't think that discussing names is going to mean much. From a
contents standpoint, it does make sense that the stuff in std.exception and my
stuff would be lumped together, and it does not make sense for my stuff to be in
its own module at this point. There isn't enough of it, and since it fits well in
std.exception, there's even less reason to create a new module for it. So, if a
change is to be made, I think that it's going to have to be to the name of
std.exception, and I can't think of a better name nor have I see a better name
suggested.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list