Re: Thou shalt have no other gods before the ANSI C standard
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 02/24/05
- Next message: Paul Rubin: "Re: Thou shalt have no other gods before the ANSI C standard"
- Previous message: KeithK: "Re: Complex solutions, current state of the art"
- In reply to: Michael Amling: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Bryan Olson: "Re: Thou shalt have no other gods before the ANSI C standard"
- Reply: Bryan Olson: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 24 Feb 2005 16:44:40 GMT
Michael Amling wrote:
> CBFalconer wrote:
>>
>> You haven't gone far enough. Your proposal involves exposing the
>> makeup of struct buf, without which the user can't access the size,
>> and thus can't allocate the storage. It is better to only define a
>> pointer to the opaque structure, and ensure the buffer module
>> proper does any storage allocation. The resultant data will still
>> be in the users data space. For an example of this see how the
>> fundamental structure is allocated and maneuvered in my hashlib:
>>
>> <http://cbfalconer.home.att.net/download/hashlib.zip>
>>
>> This breakup provides complete freedom to redesign the structures
>> in question without affecting the user code (although relinking may
>> be needed). Reduction of interconnections is always good, in my
>> book.
>>
>> Again in hashlib, note how specific performance data is returned in
>> a structure, and how that structure is returned from an access
>> function. That means that there is no way for a user to harm the
>> data in the hashlib module. It also means that modification of
>> that structure will require user recompilation, but that is easily
>> controlled via the date of the .h file.
>
> If you go far enough in this direction, you'll end up at Java.
I have been vacillating between ignoring and replying to this
vacuous comment, and eventually decided to reply in case some poor
innocent takes it seriously. I have been pointing out techniques
that allow the creation of bug-free maintainable software using
only the facilities of ISO standard C. This has no resemblance
whatsoever to Java.
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
- Next message: Paul Rubin: "Re: Thou shalt have no other gods before the ANSI C standard"
- Previous message: KeithK: "Re: Complex solutions, current state of the art"
- In reply to: Michael Amling: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Bryan Olson: "Re: Thou shalt have no other gods before the ANSI C standard"
- Reply: Bryan Olson: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|