From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25787 invoked by alias); 4 Dec 2009 18:48:44 -0000 Received: (qmail 25767 invoked by uid 22791); 4 Dec 2009 18:48:42 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_40,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, 04 Dec 2009 18:48:39 +0000 Date: Fri, 04 Dec 2009 18:48:00 -0000 Message-ID: From: Brian Gough To: Gerard Jungman Cc: gsl-discuss@sourceware.org Subject: Re: gsl container designs In-Reply-To: <1259110486.3028.69.camel@manticore.lanl.gov> References: <1259110486.3028.69.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: 1ed5e571dfae3e43cb8d3841ea55d2a8 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/msg00051.txt.bz2 At Tue, 24 Nov 2009 17:54:46 -0700, Gerard Jungman wrote: > Here are header files for a couple different approaches to containers. > I didn't bother with any implementations; it seems obvious how to > implement most of these functions. > > The designs are not complete, but they express most of > the important stuff. Thanks for the document, I have studied the designs this week. It seems that changing to design 1 / 1u / 2 would be trading one set of problems for another. Looking at each case, the change doesn't seem sufficient to justify the compatibility cost. Regarding the introductory points. 2a+b) While we may have had some kind of goal of supporting C++ I don't think it's worth encouraging that today as the gap between the languages has widened so much since the start of the project. 3) Non-levelised types. These seem to be the price for type safety. In terms of the look/feel, expressions like &row.vector and &column.vector don't seem too unnatural to me. 4) I think this can be fixed in the current framework. 5) Since row-major was in the original design it's too much of a break to change that. I think the most realistic way forward is to add a multiarray type, with rank-1, rank-2 and rank-N versions, in the existing framework and use non-levelised types for const/non-const views to preserve type-safety. -- Brian Gough