From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20154 invoked by alias); 15 Nov 2009 16:44:48 -0000 Received: (qmail 20145 invoked by uid 22791); 15 Nov 2009 16:44:46 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f219.google.com (HELO mail-bw0-f219.google.com) (209.85.218.219) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Nov 2009 16:43:34 +0000 Received: by bwz19 with SMTP id 19so5448332bwz.8 for ; Sun, 15 Nov 2009 08:43:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.184.168 with SMTP id y40mr663612hbg.194.1258303411843; Sun, 15 Nov 2009 08:43:31 -0800 (PST) In-Reply-To: <4AFFC617.9050707@iki.fi> References: <1257277549.19313.118.camel@manticore.lanl.gov> <1257808063.11663.3.camel@manticore.lanl.gov> <87tywxtbf4.wl%bjg@network-theory.co.uk> <4AFFC617.9050707@iki.fi> Date: Sun, 15 Nov 2009 16:44:00 -0000 Message-ID: <645d17210911150843h7034c341yb453d3fb3f3fb8cf@mail.gmail.com> Subject: Re: containers tentative design summary From: Jonathan Underwood To: gsl-discuss@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00043.txt.bz2 2009/11/15 Tuomo Keskitalo : > Hello, > > On 11/14/2009 04:42 PM, Brian Gough wrote: > >> At Mon, 09 Nov 2009 16:07:43 -0700, >> Gerard Jungman wrote: >>> >>> On Fri, 2009-11-06 at 14:42 +0000, Brian Gough wrote: >>>> >>>> Ok, I have read the paper now. =A0I do think the practice of casting >>>> described there is rather dated. =A0When people had no viable >>>> alternative to C, they had to resort to such tricks. =A0It is not >>>> something that should be encouraged today -- programs should either be >>>> written safely, following the rules of type-checking in C, or be >>>> written in another language. >> >> From 1.3 million lines of code they describe only one method which >> does not use casts, which is the one we use. =A0I don't think we are >> going to find anything that is better than the current method for >> views. > > Apparently this is a fundamental question. > > Currently GSL uses C in a type-safe manner which forces somewhat complica= ted > APIs for everyone but enables users to find some lethal bugs. More > user-friendly APIs would allow people to silently break their programs if > they are not careful. And there is no compromise. Does this summarize the > situation? > > I am sure there are users for both approaches. I don't know.. Maybe GSL > should be the safe, strict library, and there should be another scientific > library in C which aims towards interoperability between data, libraries = and > languages? This would split forces, but both projects would also benefit > from each other. > I think it would be better if GSL, being written in C, were to present the most functional interface at the expense of sacrificing type safety, and higher level language bindings could then wrap that API and do type checking as needed. As gerard says, C isn't about type safety. Jonathan