On Friday, 26 August 2016 14:08:37 CEST Richard W.M. Jones wrote:
> Methods in OCaml which don't take any parameters don't require the
> dummy unit arg, ie writing:
> 
>   method foo = ...
> 
> is fine.  The reason you might need the unit arg is if you need to
> create a closure from the method without calling it, for example if
> you need to use the method in a callback.
> 
> In lablgtk2 the convention is to use unitless methods if either: the
> method shouldn't be used as a callback; or: (conceptually) the method
> doesn't change the object's internal state.  Let's do that here.
> ---

Ah OK, it makes sense.  I chose the safe way and added the unit arg
to avoid issues with closures, although I'm fine with the change given
that it follows an established convention.

Thanks,
-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to