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: GSL 2.0 roadmap (one man's view)


On Mon, 2009-09-07 at 16:07 +0100, Brian Gough wrote:
> At Thu, 27 Aug 2009 17:15:39 -0600,
> Gerard Jungman wrote:
> >   There are also significant usability issues with the simple aspects
> >   of the interfaces. The get() and set() functions have been deplored
> >   by many users. 
> 
> Is there an alternative in C?  I can only think of providing macros
> for expressions like *gsl_vector_ptr(v,i) = x if one prefers to assign
> to an l-value.

Yes and no.

For example, in 9/10 cases the underlying data is just a contiguous
block of double (with unit stride). In that case I can always just
extract the pointer and apply [].

Ok, you say, this is very dangerous because somebody could pull the
rug out from under you, or you might forget about striding, etc.
True. But the GSL interface should not make it harder to do things
in the simplest 9/10 cases. There should be a way for the data
pointer (or block) to coexist with the meta-info for layout,
so that both can be used as needed.

It smells like a view, and indeed it is. But it is a notion of
view which is more central to the design than the current one.
Everything should be a view.

Again, more details will follow, if I get around to typing
what is in my head. But we're all experienced adults here;
isn't it clear that there must be a better way, independent
of what I end up typing?

--
G. Jungman



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