metaeducation / rebol-issues

6 stars 1 forks source link

WISH: implement VECTOR of PAIR values #2356

Open Oldes opened 5 years ago

Oldes commented 5 years ago

As internally pair! is stored as 2 32bit decimal numbers, it should be possible to have vector! of pair!s. Proposed possible behaviour:

>> points: make vector! [pair! 4]
== make vector! [pair! [0x0 0x0 0x0 0x0]]
>> points/1: random 100x100
== 65x23
>> points
== make vector! [pair! [65x23 0x0 0x0 0x0]]
Oldes commented 5 years ago

Unfortunately the original internal implementation has only one bit for storing the type (integer or decimal). So it would need some rework, but being able to work with array of points directly is probably worth the change.

hostilefork commented 5 years ago

adding such a type of labels is not funny.

I was trying to count how many you had made and cluster them together. As for humor...it is subjective, and if you choose not to find anything amusing, I guess you may. My own feeling--as I posted--is that diving deeper into details of the creaky vector codebase without first addressing more fundamental questions about series/mutability/type-extensibility is misguided...but it's your time.