World: r3wp
[!REBOL3]
older newer | first last |
Robert 6-Mar-2010 [1349] | How about allowing: clear object! This could set all object! words to none. Would be a nice way to reset an object! into a clean state. |
Steeve 6-Mar-2010 [1350] | We aleady have it >> set my-object none |
Robert 6-Mar-2010 [1351] | Ah, cool. But it's not very obvious from the wording. IMO clear would be nice. |
Steeve 6-Mar-2010 [1352] | don't waste our time, do a mezz if you prefer ;-) |
Henrik 6-Mar-2010 [1353] | using clear would imply that an object is a series. |
Paul 6-Mar-2010 [1354] | Carl is here maybe he can comment on the previous discussion regarding chaining. |
Steeve 6-Mar-2010 [1355] | eh ? where is that discussion ? |
Paul 6-Mar-2010 [1356x4] | That was this one: >> a: construct [b: c: 2] == make object! [ b: 2 c: 2 ] |
On how to keep the 'b from being assigned the 2 | |
So that it could actually be: ==make object! [ b: none c: 2 ] | |
Just so that we can do some dynamic building of blocks with set-words and pass it to construct and not worry about a set-word getting assigned a value from the chain. | |
Steeve 6-Mar-2010 [1360] | you want optional assignement ? |
Paul 6-Mar-2010 [1361] | yes, maybe a refinement that allows me to suppress the chaining for constructs |
Andreas 6-Mar-2010 [1362] | Paul, just iterate through the block before you construct it and whenever a set-word! is followed by another set-word! insert a none in between. |
Paul 6-Mar-2010 [1363] | Yeah I could do that Anreas, just like most functions we can usually do some prework but thought it would offer something a bit safer built-in. |
Andreas 6-Mar-2010 [1364] | Write such a function and offer it to be included as mezzanine. |
Paul 6-Mar-2010 [1365x2] | Any chance we can promote a feature of REBOL that looks more secure or performance oriented out of the box is a marketing plus in my opinion. |
I could Andreas but thought it would be more bloat than a refinement would incurr. | |
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. |
older newer | first last |