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

World: r3wp

[!REBOL3]

Andreas
6-Mar-2010
[1367]
Any refinement you are thinking of would need to to exactly that.
Chris
6-Mar-2010
[1368]
The bloat would be hidden behind the refinement...
Paul
6-Mar-2010
[1369]
Which I would assume would be less than me roleing it from the top
Andreas
6-Mar-2010
[1370]
Paul, if you need it, just write it.
Paul
6-Mar-2010
[1371x2]
I could give that answer to 90 percent of the things we ask for in 
R3.  ;-)
So often I think that mezzanines are not the answer sometimes to 
what could just be added as a refinement to an existing function. 
 Don't like to do that much to functions that are often invoked in 
looping or iteration routines.
Henrik
6-Mar-2010
[1373]
Paul, what's the advantage behind what you need? The way constructs 
are written now is standard REBOL syntax.
Paul
6-Mar-2010
[1374]
currently constructs will perform the chain assignment.
Andreas
6-Mar-2010
[1375]
It only looks like "chain assignment", it's really nothing special.
Paul
6-Mar-2010
[1376]
Well we love chain assignment - when we want it.  Don't like it when 
we don't want it.
Henrik
6-Mar-2010
[1377]
when don't we want it?
Chris
6-Mar-2010
[1378]
What cases do you have?
Andreas
6-Mar-2010
[1379]
Paul, what you are saying is "we love passing arguments to function 
calls - when we want it. Don't like it when we don't want it."
Paul
6-Mar-2010
[1380x4]
No Andreas, this is not passing about the passing of the arguments 
but the handling of the arguments.
The same argumet can be passed but it is how it is handled.
Chris, I had an issue where I was putting data into a block dynamically 
and then had a skip pattern over it so that every other word was 
turned into a set-word and then passed to construct.
As you can imagine that did a chain evaluation that I didn't want.
Andreas
6-Mar-2010
[1384]
Then make sure to prepare a block that does what you want.
Paul
6-Mar-2010
[1385x5]
There was actually a bit more that it did in removing some data but 
anyway the point is that it cause some values to get the next value 
in the chain.
Yes Andreas could do that but your missing the point.
The point isn't about whether or not I can do that.  I already do. 
 The point is that it offers more for the construct function to do 
at what I believe would be less cost with more to gain.
This the way you guys should think about REBOL.
Shouldn't always be about - just creating a new mezzanine.  Think 
about the cost of the mezz verses an enhancement to existing code.
Andreas
6-Mar-2010
[1390]
Paul what you are asking is that the construct function should rather 
arbitrarily rewrite the block argument it is passed.
Paul
6-Mar-2010
[1391x3]
huh? - not at all.
construct/as-is [a: b: 2]
Why would that be so difficult?
Andreas
6-Mar-2010
[1394]
Paul, set-word!s are syntax for SET. [a: b: 2] is syntactical short-hand 
for [SET 'a SET 'b 2]. SET returns sets a word to a value and returns 
that value. If you don't want to pass the result of (SET 'b 2) as 
argument to SET 'a, then just don't do it.
Paul
6-Mar-2010
[1395x3]
The block argument doesn't have to change at all - just the handling 
of it.
Yeah, Andreas, you would have thought I woulud have figured that 
out since I have been doing REBOL since 1998.  That must be something 
new.  ;-O
Now for real, it was just a request for something rather not as complex 
as the fear around it.
Andreas
6-Mar-2010
[1398]
Great, then write /as-is as a mezzanine for now and propose it to 
be included.
Henrik
6-Mar-2010
[1399]
Paul, you're basically asking for REBOL to do a fundamental change 
to its syntax inside construct.
Steeve
6-Mar-2010
[1400]
with 2 blocks it's easy, one for the definition, one for the assignement.

>> assign: funco [spec vals][append construct spec vals]
>> assign [a: b: c: d:][c: 2]
== make object! [
    a: none
    b: none
    c: 2
    d: none
]
Paul
6-Mar-2010
[1401x2]
Explain what you mean by fundamental?
Am I asking for the construct code to be change - duh!
Andreas
6-Mar-2010
[1403]
That you want a peculiar change to set-word! semantics.
Paul
6-Mar-2010
[1404x2]
Never said that Andreas.  Just in how it wants to handle the processing.
The block wouldn't be passed to set directly is all
Andreas
6-Mar-2010
[1406]
Which block?
Paul
6-Mar-2010
[1407]
The code in construct would have to parse the block
Chris
6-Mar-2010
[1408x2]
From (a: (b: (c: 2))) to ((a:) (b:) (c: 2))
That's a fundamental change...
Paul
6-Mar-2010
[1410]
so what is an unfundamental change?
Chris
6-Mar-2010
[1411]
Writing an intermediate solution for special cases...
Paul
6-Mar-2010
[1412x2]
its code that never gets executed unless the refinement is set.
no different than an either.
Andreas
6-Mar-2010
[1414]
unchain: func [spec] [forall spec [if all [set-word? first spec not 
tail? next spec set-word? second spec] [insert next spec :none]] 
spec]
Paul
6-Mar-2010
[1415]
And now I would ask you why add that function to R3 when you already 
pass a spec to contruct in the first place?
Andreas
6-Mar-2010
[1416]
I guess that's what you want. Now adding that as refinement to construct 
is a question of wether it would be of general utility. If not, it 
would just be bloat.