From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15772 invoked by alias); 30 Oct 2009 16:54:21 -0000 Received: (qmail 15752 invoked by uid 22791); 30 Oct 2009 16:54:19 -0000 X-SWARE-Spam-Status: No, hits=-1.7 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: James Bergstra Cc: Gerard Jungman , gsl-discuss@sourceware.org Subject: Re: containers tentative design summary In-Reply-To: <7f1eaee30910291440r58566738l8105bc0d8faf849b@mail.gmail.com> 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> <7f1eaee30910291440r58566738l8105bc0d8faf849b@mail.gmail.com> 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: 0fe1fe568db1c67fde440d4eaaf16577 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/msg00033.txt.bz2 At Thu, 29 Oct 2009 17:40:30 -0400, James Bergstra wrote: > If the purpose is to protect the user from accidentally messing around > with data then, as Gerard suggests, maybe we shouldn't bother. This > is not a battle that we can win in C. Good naming conventions for > functions, which indicate the arguments that will be modified, is the > most that a C library is expected to provide. The purpose is to make programs safer, rather than provide any hints for optimisation. The current system is type-safe and gives a "discarding const" compiler warning if people try to pass const objects to functions as non-const arguments - these seem like useful features. It's not clear to me what the actual benefit would be if we only had non-const vectors and matrices.