Ah, quite true, but...

I'm not very happy about READ-IO.  It was a put there
during the rush to get 2.0 networking running.  You may have
noticed that it was not documented for quite a while.  That's
because the proper way to read from any socket is the same as
obtaining a copy of data for any series:

    data: copy socket       ;-- gets all pending data

    data: copy/1024 socket  ;-- data up to 1024 units

Easier than:

    data: make string! 1030
    read-io socket data 1024

Of course, there are reasons to use read-io... when efficiency
is critical for very low level operations.

-Carl


At 11/30/99 06:02 PM +0100, you wrote:
>Hi
>
>I do not cease to object (in part:) to the REBOL creator.
>
>Carl wrote: 
>"Note that using MAKE like this is really not necessary.
>"REBOL strings automatically grow in size.  That
>"is, you can create a string of size 1, then add 99 chars to it
>"w/o a problem.  The MAKE is only used for efficiency, when you
>"know the length of the string you want.
>
>According my experience with Rebol and sockets, it's a need a allocate a
>buffer for read-io. 
>Of course that does not make the above saying wrong, but shows, that
>sometimes you have to provide enough memory.
>
>Regards
>AR
>
>-- 
>Sent through Global Message Exchange - http://www.gmx.net
> 

Reply via email to