From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15756 invoked by alias); 30 Oct 2009 16:54:19 -0000 Received: (qmail 15745 invoked by uid 22791); 30 Oct 2009 16:54:16 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.network-theory.co.uk (HELO mail.network-theory.co.uk) (66.199.228.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Oct 2009 16:54:12 +0000 Date: Fri, 30 Oct 2009 16:54:00 -0000 Message-ID: From: Brian Gough To: Gerard Jungman Cc: gsl-discuss@sourceware.org Subject: Re: containers tentative design summary In-Reply-To: <1256848906.19313.25.camel@manticore.lanl.gov> References: <1254708349.18519.4.camel@ForbiddenPlanet> <7f1eaee30910050750l738876b1p41e6bd8ae5aa6d16@mail.gmail.com> <1254783367.28192.98.camel@manticore.lanl.gov> <1256684949.19313.2.camel@manticore.lanl.gov> <1256848906.19313.25.camel@manticore.lanl.gov> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Message-Mac: 3242fdf53e8534f36c890fc4a16ca2f8 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00032.txt.bz2 At Thu, 29 Oct 2009 14:41:46 -0600, Gerard Jungman wrote: > You will never succeed in making an interface "safe" in > this sense. However, you _can_ make an interface intuitive > and safe to use in a normal manner. I don't think you > can ask any more of C. I don't think this interface is safe to use in a normal manner it it requires an explicit cast to pass a non-const object to a function accepting the const version. Any error in the argument of an explicit cast is undetectable. We should not require the use of explicit casts for common operations, it would endorse a bad practice. -- Brian Gough