the difference between copy* and copy
[1/6] from: xy:cai:msa:hinet at: 26-Jul-2004 15:26
Hi, In REBOL220.127.116.11.1, there is an action! named "copy*". It's supposed to be slightly different from the long-existing version "copy" without asterisk, I guess. I would like to know the difference between copy* and copy. Thank you. Sincerely, Jerry Tsai
[2/6] from: antonr:lexicon at: 26-Jul-2004 19:42
Ummmm, these are pointing to the same action.
>> same? :copy* :copy
== true It is defined so that protocols which define their own, internal COPY can use the normal one without using a long path like system/words/copy See the handler code of the different protocols. Here's the FTP handler COPY:
>> print mold get in system/schemes/ftp/handler 'copy
func [port /local out num index value][ out: make block! num: port/state/num index: port/state/index parse port/locals/dir-cache [ index [2 skip] num [set value skip skip (insert tail out scopy value)] ] out ] As you can see, this COPY is not the one we are familiar with. By the way, it looks like it is using 'scopy to refer to the system standard COPY, not 'copy*, as we would expect. That just means it's older code, I think. We were discussing this topic during development of View1.3 on Rebol-View world. Anton.
[3/6] from: rotenca:telvia:it at: 26-Jul-2004 12:13
> As you can see, this COPY is not the one we are familiar with. > By the way, it looks like it is using 'scopy to refer > to the system standard COPY, not 'copy*, as we would expect. > That just means it's older code, I think.
That should be my version of FTP, not the ufficial one. I use scopy, sinsert, sremove sset-modes and so on inside handler's code to make it faster (path are a little slow and get a "lot" of memory). --- Ciao Romano
[4/6] from: rotenca:telvia:it at: 26-Jul-2004 12:29
I want to add that has a little sense for me to redefine only copy, a pass-trou handler needs a new name for all action! it redefines, for example: pick poke insert copy open close set-modes get-modes and/or many others action! I think that this is an implementation error of Rebol. Internal handler functions had to be called by sistem with a different name: _pick or pick* _poke or poke* _close or close* _open or open* for example. --- Ciao Romano
[5/6] from: antonr::lexicon::net at: 27-Jul-2004 3:14
Ah yes, forgot about that; I've been using your FTP patch for so long (with no problems, I might add). The main idea is still correct; COPY was redefined, and it is a good example of a clash between the dialects of two contexts, the global context and the FTP handler context. If the words are the same but mean different things, then the dialects "fight" each other a bit, and mistakes can be made in the confusion. Anton.
[6/6] from: moliad:aei:ca at: 26-Jul-2004 23:23
> _pick or pick* > _poke or poke* > _close or close* > _open or open*
carefull now... _name we would not want rebol to start looking to much like python... ;-) -MAx