Vector Datatype

Carl Sassenrath, CTO
REBOL Technologies
29-Nov-2006 18:35 GMT

Article #0053
Main page || Index || Prior Article [0052] || Next Article [0054] || 19 Comments || Send feedback

While I have your attention (from the prior note about hash! datatype), I want to insert the vector! datatype into the discussion pipeline.

As you know, vector! has been planned for some time. I became even more motivated to add vector! after the Milan DevCon, when several Swiss developers told me it was essential to their projects.

What is a vector?

  1. In short, it is an array of a specific scalar datatype, such as integer, char, unicode, decimal, logic, and perhaps others.
  2. In long, a vector is a first class REBOL datatype that could produce useful results from the range of native methods defined for all datatypes.

For me, #1 has a lot of appeal. It provides a way to efficiently store and access large arrays.

However, I must admit that the operations provided by #2 could be quite interesting. (The computer I used next after building Amiga was the Cray XMP48, a vector-based processor - handy for scientific applications.)

Suggested Plan

Since under-the-hood, REBOL is already based on a vector engine design, it makes sense to provide a vector datatype. But, I don't want to spend a lot of time mulling about the wide range of vector function possibilities. There are a lot of other things that need to be done in 3.0.

The plan is to provide a basic no-frills vector! datatype. In its basic form, it does not add much to the size of REBOL. It may even be possible to back-port it to REBOL 2.7 with little effort.

Then, we need to hear from you, the developers, as to what additional features you may require... then set some priorities. For example, do you want vector comparison, find, addition, multiplication, etc.

So there's something for you to think about... as you sip your Cabernet over the holidays.


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