Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #103771
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Ian Collins <ian-news@hotmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: Private and public code |
| Date | Mon, 13 Feb 2017 19:07:12 +1300 |
| Lines | 35 |
| Message-ID | <egd0ogFbmb2U4@mid.individual.net> (permalink) |
| References | <20170212200353.005eb833d8a8d4e8e6d8f3de@gmail.com> <egbq9cFbmb2U3@mid.individual.net> <20170212213845.24b28c8a15ee4e41cfe2e07f@gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net Rt5gIxu3QJin/OLb9yDD6w/LmG9j9Ig0BKEj2ASHLcaoNYhkdB |
| Cancel-Lock | sha1:IER5yYFcH1p+NAKqAO4o/gxDc6Y= |
| User-Agent | Mozilla/5.0 (X11; SunOS i86pc; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
| In-Reply-To | <20170212213845.24b28c8a15ee4e41cfe2e07f@gmail.com> |
| Xref | csiph.com comp.lang.c:103771 |
Show key headers only | View raw
On 02/13/17 09:38 AM, GOTHIER Nathan wrote: > On Mon, 13 Feb 2017 08:10:36 +1300 > Ian Collins <ian-news@hotmail.com> wrote: > >> On 02/13/17 08:03 AM, GOTHIER Nathan wrote: >> >> Please limit your line length! >> >>> Hello everybody, >>> >>> After reading many headers in different C projects, I realized the >>> fact that there are many private code (macros, typedefs, ...) >>> included in headers that makes difficult to distinguish what is >>> useful for the end user. >>> >>> Since I consider headers as some kind of minimal documentation for C >>> programmers, I put every private code in source files and only public >>> code in headers. Although it could lead sometimes to put all >>> unrelated private code in one common source file with an include >>> guard. >>> >>> What do you think about this practice? >> >> Why don't you just use a private header? > > Do you compile private headers? For me appending "private" to > "header" looks weird... since we usually make public access to private > code with headers. ;-) Please limit your line length! Private headers aren't directly compiled, they are included. -- Ian
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Private and public code GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-12 20:03 +0100
Re: Private and public code Ian Collins <ian-news@hotmail.com> - 2017-02-13 08:10 +1300
Re: Private and public code GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-12 21:38 +0100
Re: Private and public code Richard Heathfield <rjh@cpax.org.uk> - 2017-02-12 20:58 +0000
Re: Private and public code GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-12 23:06 +0100
Re: Private and public code Richard Heathfield <rjh@cpax.org.uk> - 2017-02-13 06:00 +0000
Re: Private and public code GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-13 08:31 +0100
Re: Private and public code Ian Collins <ian-news@hotmail.com> - 2017-02-13 19:07 +1300
Re: Private and public code GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-13 09:14 +0100
csiph-web