Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #10675
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Method that only one other class type may access |
| Date | 2011-10-05 21:39 +1300 |
| Message-ID | <9f2jekFaemU2@mid.individual.net> (permalink) |
| References | (2 earlier) <slrnj8k7uc.1bk.grahn+nntp@frailea.sa.invalid> <9ev7noFdlfU1@mid.individual.net> <840429b4-ebb0-41ae-ab28-0934af8b91e9@m15g2000vbk.googlegroups.com> <9f1c51F4qnU1@mid.individual.net> <slrnj8o4ns.1bk.grahn+nntp@frailea.sa.invalid> |
On 10/ 5/11 09:19 PM, Jorgen Grahn wrote: > On Tue, 2011-10-04, Ian Collins wrote: >> >> Just use the native interface. On one of my projects we had a long >> discussion about this topic and that was our conclusion: KISS! > > I'm repeating myself, but an anecdote: > > A few years back I decided to write The One True C++ Wrapper For BSD > Sockets. I wanted type safety: distinct types for UDP sockets, TCP > listening sockets, "normal" TCP sockets ... with the type system > preventing mistakes such as doing listen() on an UDP socket or setting > UDP-specific socket options on a TCP socket. But at the same time I > didn't want to invent a brand new interface to learn. > > After a while I realized that (a) this was hard work and (b) it was > for the most part not useful work. Any half-decent design in your > application makes most of the mistakes I wanted to eliminate > - unlikely to happen, because you tend to keep different kinds of > sockets apart > - likely to be found quickly if they /did/ happen > > So I threw most of it away. I just kept some read/write buffering code > which had proven useful in real life. At least you had the good sense to give up after only one attempt. I had three goes, over 15 years before realising the error of my ways. > (Disclaimer: I have no experience with Boost.asio; perhaps it forces you > in another direction.) I've only ever seen it end in tears. -- Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Method that only one other class type may access Christopher <cpisz@austin.rr.com> - 2011-10-01 13:32 -0700
Re: Method that only one other class type may access Christopher <cpisz@austin.rr.com> - 2011-10-01 13:50 -0700
Re: Method that only one other class type may access Noah Roberts <roberts.noah@gmail.com> - 2011-10-02 11:13 -0700
Re: Method that only one other class type may access Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-10-01 23:38 +0200
Re: Method that only one other class type may access Christopher <cpisz@austin.rr.com> - 2011-10-01 15:34 -0700
Re: Method that only one other class type may access Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-10-02 15:27 +0200
Re: Method that only one other class type may access Noah Roberts <roberts.noah@gmail.com> - 2011-10-02 11:06 -0700
Re: Method that only one other class type may access Paul N <gw7rib@aol.com> - 2011-10-03 11:48 -0700
Re: Method that only one other class type may access Ian Collins <ian-news@hotmail.com> - 2011-10-04 08:10 +1300
Re: Method that only one other class type may access Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-10-03 20:49 +0000
Re: Method that only one other class type may access Ian Collins <ian-news@hotmail.com> - 2011-10-04 15:01 +1300
Re: Method that only one other class type may access Christopher <cpisz@austin.rr.com> - 2011-10-04 14:21 -0700
Re: Method that only one other class type may access Ian Collins <ian-news@hotmail.com> - 2011-10-05 10:29 +1300
Re: Method that only one other class type may access Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-10-05 08:19 +0000
Re: Method that only one other class type may access Ian Collins <ian-news@hotmail.com> - 2011-10-05 21:39 +1300
Re: Method that only one other class type may access Miles Bader <miles@gnu.org> - 2011-10-05 18:09 +0900
Re: Method that only one other class type may access Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-10-05 18:30 +0000
Re: Method that only one other class type may access Werner <werasm@gmail.com> - 2011-10-05 00:02 -0700
csiph-web