Hash Datatype Conclusions

Carl Sassenrath, CTO
REBOL Technologies
2-Dec-2006 20:09 GMT

Article #0054
Main page || Index || Prior Article [0053] || Next Article [0055] || 31 Comments || Send feedback

Ok, a lot of good input posted on Change the Hash Datatype in 3.0?. Thanks.

Generally, I like the strength of the REBOL language to be at the datatype level. I'd really like to find a good solution to this issue as a datatype -- not requiring mezz functions (or nothing more than "simplicity wrappers" at mezz level).

As you know, datatypes in REBOL span not only internal representation, but also methods of operation (e.g. block vs hash) and external representation (e.g. block vs path). These are important in REBOL, and provide insight into the range of valid solutions.

My view is: hash! works, but at the expense of implementational complexity (e.g. it was buggy for "good reason"), additional overhead (strict block order maintenance), and a general impedance mismatch to most usage cases (e.g. dictionary).

I think it's this last case that defines the problem and hence dictates the solution. The primary goal of all REBOL datatypes is to provide a simple concept -- our brains seek a pure, simple abstraction. We know what integers are and do. We know what blocks are and do. But, hash!, unfortunately that's a mystery to many developers. We don't think of it as a nice concept "nugget".

Yet, the concept of a "dictionary" itself is a simple abstraction and has found extensive use in many other languages. So, that sounds more like a proper REBOL datatype, rather than hash.

I think that is the direction we need to go. We don't want to google the usage of a datatype each time we need it. We want it to pop into our brains... a simple abstraction. The concept of an associative array or dictionary lookup does that.

Now comes that sweet and sour process of picking a good datatype name for it. Do we want to still call it hash!, is it better to call it assoc! or dictionary!, or can we find a better/shorter name? Got one? Post it. Thanks.


Updated 14-Jun-2024 - Edit - Copyright REBOL Technologies -