[REBOL] Re: About Standards and Best Practices
From: brett:codeconscious at: 2-Sep-2003 12:38
> What I'm asking is just a few tips such as:
> 1) create objects when ....
> 2) always use local vars inside functions. (or if this var is inside a
> function, it's a local var anyway).
> 3) call various scripts or code everything in one file..
> 4) clear, reset vars..
> 5) use dynamic vars inside functions..
> 6) work creating instances of objects
Very good question. I have struggled with coming up with my own style that
takes most advantage of REBOL's flexibility. The thing that I have found is
that REBOL's flexibility actually makes it hard to create rules like "Always
....". I invariably find another situation that makes the very thing I'm
trying to avoid useful or innovative. So it turns on the situation.
It is probably best then to have a place where these "idioms" can be
proposed and discussed. Each should establish a situation and a possible
idiom that would be useful. Like another cookbook - but aimed at someone who
has already learnt the basics of REBOL. This is similar in concept to the
early days of "design patterns" - but I would suggest trying to avoid the
dogmatism that I saw in that area of work when I last looked. The risk is if
you go into too much detail (it must be this way or that) then you lose the
value of the idea, I think.
The existing REBOL code produced by RT is implicitly a guide too.
Regards,
Brett