[Gambas-devel] About gb.adt (2)

Emil Lenngren emil.lenngren at ...176...
Fri Aug 24 15:45:20 CEST 2012


Hmm.. Red-black trees...
I don't know how much you guys like C++, but why not simply make a wrapper
around std::set<GB_VARIANT_VALUE>?

std::set is fast and reliable. There would be no memory overhead for tree
object and tree nodes compared to if you write your own. The code is
already written.
The only drawback I see is that you have to link to libstdc++. On the other
hand, if you write your own tree, I think the binary code size will be
larger because much of the stuff of std::set is already in the
libstdc++.so-file.

/Emil

2012/8/24 Tobias Boege <tobias at ...692...>

> On Thu, 23 Aug 2012, Beno?t Minisini wrote:
> > Hi Tobi,
> >
> > A few thoughts about gb.adt. I don't know if you have rewritten the List
> > class yet.
>
> I'm working on the Lists. Maybe tonight it's finished...
>
> >
> > I don't like the "gb.adt" name. Why "abstract datatypes"? They are not
> > abstract at all.
> >
> > The english wikipedia names all these sorts of things (trees, maps,
> > lists...) just "data structures".
> >
>
> Hmm, according to what I learnt, a Stack is already an abstract datatype.
> Whatever the above Wikipedia author says the one writing this text[0] says
> that a Stack _is_ abstract and gives the kind of definition I am used to.
>
> > Maybe you could rename the component "gb.data" then. Because
> > "gb.datastructure" is too long, and because "gb.ds" is too short. :-)
> >
>
> But renaming would be no big deal, just that I like 3-character
> abbreviations.
>
> > And then you become a very nice guy and make a wonderful implementation
> > of red-black trees for all of us. ;-)
> >
> > --
> > Beno?t Minisini
>
> Am I not a very nice guy already? ;-) Yes, such things are in my mind, too,
> but I really never did them before. My next goal was trees and graphs,
> anyway, but I need information about these structures and algorithms...
>
> Regards,
> Tobi
>
> [0] http://en.wikipedia.org/wiki/Abstract_data_type
>
>
>
> ------------------------------------------------------------------------------
> 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/20120824/2c561a6c/attachment.html>


More information about the Devel mailing list