From "C" to Rebol: HELP!!/RESEND
[1/3] from: tim:johnsons-web at: 26-Jul-2001 8:56
the original... ===================================================================== Hello All: I've been programming in Rebol for a year. I've been programming in other languages for much longer. Coding in C for 12 years, and therein lies the issue. Oftentimes, I find myself so "stuck" in the "C" paradigm, that although my rebol code works, I'm not really taking full advantage of what rebol has to offer. Here's an example: One might write a function that prints a block of rebol code like this: ; warning!! untested code print-block1: func[blk[block!]/local index][ index: 1 loop length? blk[ print pick blk index index: index + 1 ] ] or one might write a function that looks like this: print-block2: func[blk[block!]][ forall blk[print first blk] blk: first blk ] It is probably safe for me to say that print-block2 is better reboleze than is print-block1, which one could say is "tainted" by the "c" approach. Now, here's what I propose: If two or three of you "real rebol programmers" would like to participate as mentors: I will provide code that is working rebol code, the mentor(s) will then offer suggestions that will optimize the code, rebol-wise. The following results are possible: 1)I could take the "before" and "after" code and turn it into some sort of a tutorial. 2)My writing would *most definitely* be improved. 3)Perhaps, if RT finds it acceptable, that I would then have some good rebol code to add to the script library. I would appreciate feedback on this issue: I hope some of you might tell me what you think. Perhaps this is something that I and "mentors" could take off of the list until some results present themselves. regards Tim Johnson
[2/3] from: dvydra2::yahoo at: 31-Jul-2001 7:59
Tim, I have the same problem. Thanks for bringing up this issue. Regards, David --- Tim Johnson <[tim--johnsons-web--com]> wrote:
> the original... > Hello All:
<<quoted lines omitted: 54>>> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
===== David Vydra www.vydra.net david (at) vydra (dot) net
[3/3] from: joel::neely::fedex::com at: 31-Jul-2001 10:45
Hi, Tim, Tim Johnson wrote:
> ; warning!! untested code > print-block1: func[blk[block!]/local index][
<<quoted lines omitted: 12>>> "reboleze" than is print-block1, which one could say is "tainted" > by the "c" approach.
print-block3: func [blk [block!]] [ foreach item blk [print item] ]
> Now, here's what I propose: If two or three of you "real rebol > programmers" would like to participate as mentors: > I will provide code that is working rebol code, the mentor(s) > will then offer suggestions that will optimize the code, > rebol-wise. >
> I would appreciate feedback on this issue: >
I don't claim to be one of the two or three real REBOL programmers, but I'd be glad to participate in such a series of discussions. My schedule has been a bit chaotic lately, so I can't promise immediate turnaround, but would be glad to contribute as time permits. I'd suggest keeping it on the mailing list, both to maximize the list of participants and to maximize the audience. I've often learned something from seeing an answer to someone else's question that I hadn't thought to ask. -jn- -- This sentence contradicts itself -- no actually it doesn't. -- Doug Hofstadter joel<dot>neely<at>fedex<dot>com
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted