[REBOL] Re: async interface

2004-03-11 Thread Romano Paolo Tenca
Hi Gabriele, > RPT> dns-failure > RPT> connect-failure > > Why not using only one function for all errors? I do not like to handle errors in rebol. I must disarm the error, check the right field, know what code/type/id/arg I must find to understand what kind of error is. Some errors are

[REBOL] Re: async interface

2004-03-11 Thread Gabriele Santilli
Hi Romano, On Tuesday, March 9, 2004, 7:31:35 PM, you wrote: RPT> dns-failure RPT> connect-failure Why not using only one function for all errors? And, I think the connect event is useful, as you may want to start sending data when the connection is established and not before (imag

[REBOL] Re: async interface

2004-03-09 Thread Romano Paolo Tenca
Hi Anton, > What were you thinking resolve* would be for ? Resolve can be ignored, but resolve can fail, like connect. I am asking it all that errors are a good thing. I am thinking to use words instead: dns-failure connect-failure errors could be used only for i/o errors This makes

[REBOL] Re: async interface

2004-03-09 Thread Romano Paolo Tenca
Hi Andreas, > ; default dispatcher > handle: func [ port [port!] state [word! error!] ] [ > either error? state [ > on-error port state > ] [ > switch state [ > connect [ on-connect port ] > close [ on-close

[REBOL] Re: async interface

2004-03-09 Thread Andreas Bolka
Thursday, March 4, 2004, 4:33:29 PM, Romano wrote: > I should like to define a common (standard) interface for async > protocols. > I proposed some time ago an object! style, like the View feel, > instead of the awake function. > What do you think? Sorry if that's missing the point, but I'm c

[REBOL] Re: async interface

2004-03-08 Thread Gabriele Santilli
Hi Anton, On Monday, March 8, 2004, 12:12:57 PM, you wrote: AR> Hang on, I'm not sure I like this. Isn't the convention AR> to add an asterisk to the word when it refers to the default AR> built-in word? ie. write* = system/words/write The simplest way is the opposite (like Romano suggests); t

[REBOL] Re: async interface

2004-03-08 Thread Anton Rolls
Hi Romano, > Hi Anton, > > > The advantage of that over a single function, I suppose, > > is so that you can derive from a standard base > > object (or choose from several easy-to-use example objects), > > with the four functions [connect read write close] inside. > > > > I would be happy with th

[REBOL] Re: async interface

2004-03-05 Thread Romano Paolo Tenca
Hi Anton, > The advantage of that over a single function, I suppose, > is so that you can derive from a standard base > object (or choose from several easy-to-use example objects), > with the four functions [connect read write close] inside. > > I would be happy with that, if that was what you we

[REBOL] Re: async interface

2004-03-04 Thread Anton Rolls
The advantage of that over a single function, I suppose, is so that you can derive from a standard base object (or choose from several easy-to-use example objects), with the four functions [connect read write close] inside. I would be happy with that, if that was what you were thinking. Also, I