[REBOL] Two questions. (RE) Re:
From: jelinem1::nationwide::com at: 12-Sep-2000 8:49
>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]
I'm sure that is more natural for you. However I must speak up for those of
us who are OK with the way things are. Syntax is syntax, and the order of
arguments is IMO pretty trivial. Keep in mind that if you change this, then
you will upset a whole group of other people.
> 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.
I really don't get what you are complaining about here. Are you upset
because you can't use the exact syntax to refer to array elements like in
certain other (nameless) languages? Although different does not necessarily
imply better, IMO REBOL *IS* better.
arr: array 10
repeat idx 10 [change arr idx "REBOL rocks"]
(BTW I stumbled over (ie learned) the 'array word while working this out.
Coolies :))
- Michael Jelinek
> 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?"
Here's a blurb to put into the REBOl doc:
Forget everything you know about other languages and think: REBOL!