World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Steeve 21-Aug-2009 [16872x2] | it works with CONTEXT too |
set c: context [a: b: none] [3 5] | |
Henrik 21-Aug-2009 [16874] | same problem |
Maxim 21-Aug-2009 [16875] | To me EEBOL is about syntax, and the get block set block idea seems very interesting. |
Henrik 21-Aug-2009 [16876] | what happens when you say: [a [b c]: d]: [1 [2 3] 4] |
Steeve 21-Aug-2009 [16877] | very rebolish, but is that very usefull ? |
Maxim 21-Aug-2009 [16878] | its just like op vs function notation to me... z: ADD x y vs z: x + y |
Henrik 21-Aug-2009 [16879] | I'm not sure it is. :-) but many things don't seem very useful on the surface. I'm still thinking in terms of setting mulitple words with multiple values in one operation. I hate picking words out of a block, one at a time. It becomes more powerful when you replace the blocks with words. Then you can use the same program structure to set one-to-many, one-to-one, many-to-one and many-to-many words. |
Maxim 21-Aug-2009 [16880] | yep... like : z: [b c] [a :z d]: [1 [2 3] 4] |
Steeve 21-Aug-2009 [16881] | rough |
Maxim 21-Aug-2009 [16882] | if z s a word, IT gets assigned [1 2] if z is a get-word, its content is assigned to the content [1 2], so in the above, b and c would be 1 and 2 respectively. |
Henrik 21-Aug-2009 [16883] | but then: z: [b c] :z: [3 4] or what? :-) |
Steeve 21-Aug-2009 [16884x4] | i would prefer another syntax to assign the content instead of the container |
z:: [3 4] | |
double : | |
not bad eh ? | |
Maxim 21-Aug-2009 [16888x4] | well, its the current syntax :z already means what I contain. |
double colon makes no sense... what are you assigning to z? a new datatype? | |
but Henrik's :z: has me puzzled here: [a :z: d]: [1 [2 3] 4] what would the above mean? hehe | |
(in current form of syntax) | |
Steeve 21-Aug-2009 [16892] | and what is your :z: ? a new datatype too, much more confusing to my mind |
Maxim 21-Aug-2009 [16893x2] | no :z already exists. if z where a function, it returns the function itself, not its evaluation. |
get words returns the content of the word without evaluating them. | |
Steeve 21-Aug-2009 [16895x3] | i don't speak about that |
but :z: | |
that is a new datatype, a GET-SET | |
Maxim 21-Aug-2009 [16898x2] | ahhh... sorry, didn't see the last colon. |
it already exists too! | |
Steeve 21-Aug-2009 [16900] | no |
Maxim 21-Aug-2009 [16901x3] | it does in path notation. its also silently ignored in the command line as long as the get-set word actually holds a word within :-) |
>> y: 'c >> probe :y: func [][print "2"] >> c but it should assign the function to c... its logical actually. | |
in a path, it works though. | |
Steeve 21-Aug-2009 [16904x2] | but in plain REBOL, it has to be a new datatype |
the path evaluation use another one scheme | |
Maxim 21-Aug-2009 [16906] | not, it should just do like in the path notation, get the value of the word, and set to that value . |
Steeve 21-Aug-2009 [16907x4] | n |
no, the path evaluation scheme uses a string parser | |
a path is a string in memory | |
the rules are differents | |
Maxim 21-Aug-2009 [16911x2] | I think I see what you mean when you say a new datatype... yes, it would be a get-set word, but the path notation already makes it clear how that should work... and I've used it often |
so semantically its nothing new. but in the context of the above multi-assign, I concur that the meaning becomes a bit obscure. | |
Steeve 21-Aug-2009 [16913x2] | yes but it's not transposable as-is in plain rebol |
it has to be a new datatype | |
Maxim 21-Aug-2009 [16915] | just as get-word and set-word are different datatypes. this is just the combination of both actually, code wise, its probably a one hour affaire for Carl, maybe even less. |
Steeve 21-Aug-2009 [16916] | if he thinks it's valuable, i think it's easy to do too |
Maxim 21-Aug-2009 [16917x2] | posted a note about it in R3 chat... just to see his reaction :-) |
a: [x y] b: 'a :b: [22 33] == x: 22 == y: 33 | |
Steeve 21-Aug-2009 [16919] | probably a flame :) |
Maxim 21-Aug-2009 [16920] | hehe |
BrianH 21-Aug-2009 [16921] | Geomol, I wrote MAP-EACH and APPLY functions for R2/Forward - both required code generation by the function. |
older newer | first last |