Re: A proposal for parameter style

On Apr 28, 2010, at 15:01 , Anselm R Garbe wrote:
> One idea I proposed originally in BONDI was having all callbacks at
> the end of functions:
> 
> void func(options, [successCB, [errorCB]]);
> 
> The advantage would have been that an implementation would have been
> able to react sync or async depending of the arguments passed in (eg
> if no CBs passed in, it could have done the operation synchronously).

I like the DWIM nature of it :) But on the downside it requires to pass null or {} when there are no options, and I have a feeling that using it to decide on the synchronicity of the call is perhaps a little too smart. Also, we don't want all calls to be usable synchronously!

--
Robin Berjon
  robineko — hired gun, higher standards
  http://robineko.com/

Received on Wednesday, 28 April 2010 16:24:54 UTC