Re: Dictionary, hashing limitations



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."
==================================================
.



Relevant Pages

  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: The Stowe Unitary System
    ... > For the first time I have been able to define all fundamental constants ... > in terms of basic medium parameters, ... fitting into a unified system. ... > Maxwell's aether. ...
    (sci.physics)
  • Re: The Stowe Unitary System
    ... > For the first time I have been able to define all fundamental constants ... > in terms of basic medium parameters, ... fitting into a unified system. ... > Maxwell's aether. ...
    (sci.astro)
  • Re: The Stowe Unitary System
    ... > For the first time I have been able to define all fundamental constants ... > in terms of basic medium parameters, ... fitting into a unified system. ... > Maxwell's aether. ...
    (sci.physics.relativity)
  • Re: The Sci-Fi Rejection Letter That Time Forgot
    ... nations have stockpiled arsenals of these incredible bombs and the time the story is set. ...
    (rec.arts.sf.written)

Loading