[Gambas-devel] About gb.gsl components

Emil Lenngren emil.lenngren at ...176...
Tue Jul 10 00:50:38 CEST 2012


Some thoughts:

Wouldn't it be better to be more generalized with all those operators?
I mean now they have to be native functions in a special interface.
Inheriting and virtual calls and other OO stuff doesn't seem to work with
them.

Why not simply see if an object has the method "_add" when you try to add
an object with something? Then you are not restricted to native classes,
but can use the "standard" principles and calling conventions and
inheritance rules. Of course this will be slower than directly calling the
correct C function through an interface but it won't be slower than a
normal gambas call.

/Emil

2012/7/10 Benoît Minisini <gambas at ...1...>

> Le 09/07/2012 19:36, Benoît Minisini a écrit :
> > Le 09/07/2012 04:49, Benoît Minisini a écrit :
> >>
> >> As for the polynomial, I think it would be simpler to make 'Polynomial'
> >> a child of 'Float[]', and ComplexPolynomial a child of 'Complex[]'.
> >>
> >
> > Hi Randall,
> >
> > I'm currently trying to reimplement Polynomial by inheriting Float[]...
> >
> > Surprisingly, there is no polynomial arithmetic in gsl. If you are aware
> > of any polynomial arithmetic routines implemented in C (+,-,*,/,modulo),
> > I'm interested!
> >
> > Regards,
> >
>
> Finally inheriting Float[] is not interesting at all for Polynomial. I
> just have to put everything to the trash now, and do differently. A bit
> like you did before no doubt!
>
> --
> Benoît Minisini
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120710/7c1f5958/attachment.html>


More information about the Devel mailing list