tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: strtonum(3) from OpenBSD?
>>> I am eager to learn why it is bad.
That isn't my impression. I've seen at least two or three good
explanations of why it is bad; you appear to read them - at least, you
reply to the emails - but your responses seem to be simpls assertions
that the design is not bad, without either offering any justification
or addressing the points raised by the explanations.
For example, I pointed out that an interface design using a string
return with only a few strings, all fixed by the spec, is better done
with manifest cojnstants and an integral type: "better" because it's
faster, less error-prone, and more localizable. Your response was that
you found the interface not badly designed (and that it was documented,
but documenting a bad design does not make it better). You did not
indicate whether you disagreed that small-integer alternative has the
properties I listed, disagreed that those properties are good, believed
there was some other outweighing benefit, disagreed that those
disadvantages made the interface design bad, or what.
> I think all the criticism circulates around this error string...
Most of it, certainly. That's probably because it's one of the worst
aspects of the design.
> but then this is what the implementors did.
Correct. So? That doesn't make it any better designed.
> it is not wrong.
It's wrong in the sense that it is not good design for the high-level
purpose of the call - perhaps "wrong" is not a particularly good word;
I think "bad" would be a better one.
Or, at least, that's the opinion of various people here, at least a
handful of which have offered reasonable arguments to support that
stance. I have yet to see anyone offer more than bald assertions of
the converse position - perhaps I missed something.
> If you don't want the string, pass NULL
So it's possible to use it not-totally-insanely. In context, you seem
to be presenting this as an argument that the design is good, or
perhaps that this somehow makes it suitable for inclusion in NetBSD
despite the bad design. I can't see how either consequent follows from
the antecedent.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index