[fpc-pascal] Re: Example: regular expressions and "hash-tables"
shiruba at galapagossoftware.com
Tue Apr 2 04:30:33 CEST 2013
Actually it's not just hash tables, but tables in general. We have
basically two options:
2. Objects (like TCollection, etc.)
Objects are overkill to me for a lot of things where I want a more raw
datatype, and Arrays (Even dynamic ones) are a bit *too* raw. So usually
you can repurpose an existing object to do what you want, or write your
own, or... add logic to do what you want with arrays.
I think adding native support for table type processing would be a major
addition and a lot of people would say it's not Pascal-like. So we have
lots of libraries to choose from - which is good, but we always have to
take the time to look, evaluate and choose.
Although Pascal is my favorite language, dealing with "internal tables"
(with or w/o hashing) is so much easier in ABAP. Still, ABAP does a few
things really well, and is a pain for everything else. Pascal, on the
other hand, does most things well.
2013/3/22 S. Fisher <expandafter at yahoo.com>
> --- On Thu, 3/21/13, Reinier Olislagers <reinierolislagers at gmail.com>
> > From: Reinier Olislagers <reinierolislagers at gmail.com>
> > Subject: [fpc-pascal] Re: Example: regular expressions and "hash-tables"
> > To: "FPC Mailing list" <fpc-pascal at lists.freepascal.org>
> > Date: Thursday, March 21, 2013, 5:35 AM
> > On 21-3-2013 2:14, S. Fisher wrote:
> > > Not actually a hash-table, but an AvgLvlTree, which can
> > be used the
> > > same way. The AvgLvlTree unit comes with Lazarus;
> > if you don't have
> > > that, you can download avglvltree.pas here:
> > >
> > >
> > >
> > > There doesn't seem to be a lot of information available
> > on using
> > > regular expressions and hash-tables in Free Pascal, so
> > I decided to
> > > post this.
> > If I'm not mistaken, see:
> > http://wiki.lazarus.freepascal.org/AVL_Tree
> > Thanks,
> > Reinier
> Yes, that was one of the very few good references that I found.
> There doesn't seem to be much demand for hash-tables in the Free
> Pascal community. Hash-tables can be very helpful. I don't
> see a good way to do what my program does without using associative
> arrays of some type.
> Also, there doesn't seem to be much use of regular expressions.
> Anyway, TStringToPointerTree works well and seems very fast
> to me.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal