Hey list, sorry to be annoying. I've asked these two questions before, but
I've never really gotten an answer to them, and they're bugging me!

1. I'll just give an example.

blk: [11 22 33 44 55]
print skip blk 3
44 55

Why not (print skip 3 blk) instead of (print skip blk 3)? What I'm getting
at is that it seems like it would be easier to chain these things together
if the arguments were in a different order (block last). For instance:

>> blk: [1 2 3 4 5 6 7]
== [1 2 3 4 5 6 7]
>> elem: skip skip blk 2 3
== [6 7]

If you want to do nested skips, the 'skips keep piling up in the front and
the numbers of elements to skip keep on piling up in the back. It seems more
natural to me for it to be:

>> blk: [1 2 3 4 5 6 7]
== [1 2 3 4 5 6 7]
>> elem: skip 2 skip 3 blk
== [6 7]

Can any of the Rebol Tech guys explain why they made it this way? You guys
must have thought of this, and I'd be really interested to hear why you
chose against it. Pleeeese let me know!

2. The lack of associative arrays in Rebol has bugged me from the beginning.
Last time I e-mailed the list about it I got suggestions for emulating them
with blocks. Last night I thought that I could just use objects to do what I
want. obj/index is just as good to me as obj{index}. The only thing is that
I don't know of a way to add refinements to objects dynamically. Always
creating a new object from the old one when I want to add a refinement
doesn't appeal to me. I know RT must have made a conscious decision not to
include associative arrays in the language, I'm just wondering why. Blocks
supercede their functionality, etc. Please let me know. I'd be really
interested to hear the reasoning behind this.

Thank you very very much.

Keith

P.S. One of the things that could go in a Rebol FAQ in a section entitled
"For People Coming From Other Languages" could be questions like the ones
I've asked above. I could imagine a question like: "I come from a Perl
background. I'm used to using hashes for everything. What do I do in Rebol?"


Reply via email to