[Gambas-user] Unnecessary duplication?

Benoit Minisini benoit.minisini at gambas-basic.org
Mon Jun 27 22:03:41 CEST 2022

Le 27/06/2022 à 21:50, bb a écrit :
> On Mon, 2022-06-27 at 11:43 +0200, Martin wrote:
>> El 26/6/22 a las 22:27, Bruce Steers escribió:
>>> Why is it a problem for you?
>>> gsl complex is a much more advanced class than gb.complex component
>>> not a
>>> duplicate
>> Hehe, is not a problem, sorry if it sound hard.
>> I want to know why is there two clases very similar that aims to do
>> the
>> same only this I'm curious, just that.
>> The origin of my question is because I'm trying to organize the
>> available documentation of gambas (in an automatic way) then I found
>> many classes with equal name in different components.
>> If gb.complex and gb.gsl both have the class Complex and then
>> gb.complex/Complex has 2 properties and 7 methods which are also all
>> in
>> the class gb.gsl/Complex I wonder why the component gb.Complex still
>> exists?
>> a) For compatibility
>> b) If it works, don't touch it
>> c) Performance
>> d) Other
>> Best regards.
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> Specifically in the case of gb.gsl, the following is probably missing
> from the help :
> gb.gsl is an interface to the GSL libraries.
> b

Mmm, yes. I though it was evident.

Some libraries provide a lot of feature, so sometimes you may find the 
same features in two different components. I just try to make them 
following the same API, so that you can switch from one component to the 
other without having to adapt the source code.

In the case of 'gb.gsl', I decided to implement complex number support 
in a small component, so that you don't have to use 'gb.gsl' to 
manipulate them ('gb.gsl' is a big library, and it may not be available 
on your system).


Benoît Minisini.

More information about the User mailing list