From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21102 invoked by alias); 15 Nov 2009 09:13:55 -0000 Received: (qmail 21014 invoked by uid 22791); 15 Nov 2009 09:13:52 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp6.welho.com (HELO smtp6.welho.com) (213.243.153.40) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Nov 2009 09:12:59 +0000 Received: from [10.0.0.133] (cs181227241.pp.htv.fi [82.181.227.241]) by smtp6.welho.com (Postfix) with ESMTP id 0F5455BC02E; Sun, 15 Nov 2009 11:12:56 +0200 (EET) Message-ID: <4AFFC617.9050707@iki.fi> Date: Sun, 15 Nov 2009 09:13:00 -0000 From: Tuomo Keskitalo User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: Brian Gough , Gerard Jungman , gsl-discuss@sourceware.org Subject: Re: containers tentative design summary References: <1257277549.19313.118.camel@manticore.lanl.gov> <1257808063.11663.3.camel@manticore.lanl.gov> <87tywxtbf4.wl%bjg@network-theory.co.uk> In-Reply-To: <87tywxtbf4.wl%bjg@network-theory.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00042.txt.bz2 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. I do think the practice of casting >>> described there is rather dated. When people had no viable >>> alternative to C, they had to resort to such tricks. It 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. I 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 complicated 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. Anyway, I am interested to see what Gerard comes up with. -- Tuomo.Keskitalo@iki.fi http://iki.fi/tuomo.keskitalo