r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3]

Graham
14-May-2010
[3082x2]
I want to write simpler code too
I hate having to trap for errors when I always have a default behaviour
Steeve
14-May-2010
[3084]
#none is the ideal pass-true value. All your codes would be delighted 
by such feature
BrianH
14-May-2010
[3085]
I also dislike useless error bombing. Though I am in favor of *useful* 
error bombing; not the case here though.
Steeve
14-May-2010
[3086]
*pass-thru
BrianH
14-May-2010
[3087x2]
You can thank ASSERT for making LOAD more reliable in R3 than it 
is in R2. Use it yourself to the same effect :)
In contrast, I don't think that NONE = INDEX? NONE is *necessarily* 
an error. You can screen with ASSERT or EITHER when it is.
Steeve
14-May-2010
[3089]
Currently, just a bunch of natives have been tweaked in that sense.
remove, take, (and some other i can'"t remember now).

But there is no reason to restrain the invasion of the pass-thru 
behavior.


Indeed, just stop the propagation when a control flow function is 
reached :)
Graham
14-May-2010
[3090]
Is anyone analyzing rebol code to look for awkward sequences that 
might be solved by changes in functions?
BrianH
14-May-2010
[3091]
Not systematically yet, but yes on an ad-hoc basis for a few years 
now. Even during the GUI design phase before the first 2.100 public 
alpha.
Steeve
14-May-2010
[3092]
Not so easy to identify, and you have to recruit some Rebolers to 
your cause, then there is the last obstacle. How to summon Carl...
BrianH
14-May-2010
[3093]
...which you do through CureCode, and messages in R3 chat.
Steeve
14-May-2010
[3094x2]
Don't give all the secrets...
for free :)
BrianH
14-May-2010
[3096x2]
The real problems blocking systematic fixing of awkward code is:

- A lack of a large enough set of R3 code to examine. R3 is already 
different enough from R2 that the code isn't comparable in this way.

- Not having metrics for "awkward". We've been eyeballing it so far, 
and meijeru and I have been the most systematic about that approach.
But we've made a rather large set of changes to R3 already that fix 
most of the R2 awkwardness.
Steeve
14-May-2010
[3098x2]
I've give you one awkward idioms for free, pretty common.
>> unless find serie value [append serie value]
i'm bored to have to write such code again and again
Graham
14-May-2010
[3100]
prerebol it
Steeve
14-May-2010
[3101]
ahah
BrianH
14-May-2010
[3102]
APPEND is a modifying operation. This is an excellent example of 
where the propagation should stop.
Steeve
14-May-2010
[3103x3]
Agree,  indeed
but not on the first parameter:
append find serie value value
Stupid me...
BrianH
14-May-2010
[3106]
No, it's the first parameter that is being modified. In all other 
cases with none pass-through the value isn't being modified. Modifying 
operations are where the pass-through should stop.
Graham
14-May-2010
[3107x3]
if file: request-file [
	append files file
]
append/found files request-file
I lose the temp variable
Steeve
14-May-2010
[3110x3]
In that case, I usually do 
>> append files [request file []]
no temp var
missing the ANY
before the block
Graham
14-May-2010
[3113]
mine is cleaner :)
BrianH
14-May-2010
[3114]
Steeve, I suggested your unless find serie value [append serie value] 
trick earlier as an INCLUDE function, because it's the opposite of 
EXCLUDE.
Steeve
14-May-2010
[3115x3]
matter of taste :)
Yep B
Yes Brian, I saw your ticket
BrianH
14-May-2010
[3118]
bbl8r
Steeve
14-May-2010
[3119]
Bed time, see you later Guys...
Maxim
14-May-2010
[3120x3]
steeve.... about:  

unless find serie value [append serie value]
did you know rebol has a fantastic thing called.... a function?  
and yes... you are allowed to write these !!  ;-D
brianH I have been using include for years.
Graham
14-May-2010
[3123]
Max, did you know Rebol has these things called natives ?
Maxim
14-May-2010
[3124]
yeah, but many series and loop funcs aren't natives anyways.
Graham
14-May-2010
[3125]
I believe the idea is to make the language more friendly and creating 
your own mezzanines doesn't help others
Ladislav
15-May-2010
[3126x2]
I use Include function for year too, but it does something totally 
different :-p
for years
Steeve
15-May-2010
[3128]
well, 'include is a polysemic vocable, not the best choice.
BrianH
15-May-2010
[3129x2]
Steeve, good one, I had to look "polysemic" up.
Yeah, discouraging that use in R3 is a good reason to call the function 
INCLUDE.
Steeve
15-May-2010
[3131]
Sorry it's a term I like to use in French and I just googled a traduction.