This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: containers tentative design summary


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]