Re: Dictionary, hashing limitations
- From: Elizabeth D Rather <eratherXXX@xxxxxxxxx>
- Date: Mon, 21 May 2007 18:49:47 -1000
Jonah Thomas wrote:
....
And if you want to port your program then you'd like to have the
low-level dictionary words that aren't currently standardised, and you
don't know what kind of associative array you'll get -- you might port
it to a system where it's just a linked list, or it might use a hashing
algorithm that your particular keys work badly with. If a linked list is
acceptable you can make your own linked list easily without jumping
through hoops to use the system's dictionary.
And of course lots of target compilers won't have a dictionary on the
target at all.
Thinking of the dictionary as an associative array is not particularly novel, IMO. Of course it is one. But attempting to generalize too much is going to have costs. The dictionary is a *particular* associative array with *particular* uses. There are design decisions, such as whether or not the search is case-sensitive, that will limit its generality for containing, for example, binary values as keys. Most importantly, implementors take pride in designing dictionary structures to optimize something, such as search times, and attempting to standardize anything about either the structure of the dictionary or its construction/search components will meet with a lot of resistance, I think.
I like the idea of making the system internals maximally useful for
applications, and at some point that approach breaks. I'm curious where
that point comes for the dictionary. Clearly you can do anything you
want provided you design your values as Forth words and your keys as
Forth names.
I'm really unclear as to where you heading with this. Are you just having fun with the thought model, or are you trying to achieve some particular objective?
Cheers,
Elizabeth
--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
.
- Follow-Ups:
- Re: Dictionary, hashing limitations
- From: Jean-François Michaud
- Re: Dictionary, hashing limitations
- From: Jonah Thomas
- Re: Dictionary, hashing limitations
- References:
- Dictionary, hashing limitations
- From: Jonah Thomas
- Re: Dictionary, hashing limitations
- From: Bruce McFarling
- Re: Dictionary, hashing limitations
- From: Jonah Thomas
- Dictionary, hashing limitations
- Prev by Date: Re: Dictionary, hashing limitations
- Next by Date: Re: Dictionary, hashing limitations
- Previous by thread: Re: Dictionary, hashing limitations
- Next by thread: Re: Dictionary, hashing limitations
- Index(es):
Relevant Pages
|
Loading