%% Ben Laurie <[EMAIL PROTECTED]> writes:

  bl> "Paul D. Smith" wrote:

  >> It's worse than that: you have to provide two different data
  >> structures internally.  Unless you're going to cast internally, and
  >> if so why bother to have two API's anyway?  It quickly reaches the
  >> point of ridiculousness :).

  bl> There's sense in internal casting because you know that you can
  bl> carefully engineer it so that it doesn't actaully do anything
  bl> untoward.

Well, what I meant was this: the reason (I infer) that you don't like
the strstr()-style interface is that it "legalizes" a way to remove
const from a value, without explicitly casting.  The argument goes that
for programmers who aren't sufficiently careful, this can lead to
errors (which point, BTW, I do agree with--but C has never been a
language that programmers who aren't sufficiently careful should be
using--C is a knife; if you want a spoon try Pascal).

What I'm saying is that in order to truly preserve the constness of
values for the lhash API, you'd need separate data structures as well as
separate function calls.  If you don't have that, you can easily put
const data into lhash using the const function and get it out using the
non-const call, leading to the same "legal" removal of constness, just
at a distance (which, I think, is even worse).

If you reject the notion of different data structures, which I think we
can all agree would be totally ridiculous, then there's no reason to
have two API's in the first place; you might as well just leave it
simple with one API.  Or, avoid the const altogether, but I think lhash
really is an appropriate place for constification.

  bl> But I'll freely admit that this is probably an API too far in
  bl> lhash's case.

I think we're in violent agreement :).

I also think this horse is getting very close to powdered form.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>    HASMAT--HA Software Methods & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to