[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*

On Wed, Oct 07, 2015 at 01:48:11PM +0200, Pino Toscano wrote:
> On Tuesday 06 October 2015 13:30:50 Richard W.M. Jones wrote:
> > This is just a straight refactoring.  Various ad hoc string_*
> > functions that appeared in Common_utils have been renamed and placed
> > in the String.* namespace.  The old vs "new" functions are:
> > 
> > string_prefix  -> String.is_prefix
> > string_suffix  -> String.is_suffix
> > string_find    -> String.find
> > replace_str    -> String.replace
> > string_nsplit  -> String.nsplit
> > string_split   -> String.split
> > string_lines_split -> String.lines_split
> > string_random8 -> String.random8
> > ---
> As mentioned yesterday on IRC, I'm torn about this one: the functions
> would automatically alias functions with the same name, whenever
> available in OCaml' stdlib.  Also (but this is more personal), reading
> String.foo would make me think that it is part of the String module,
> and go reading its help on the documentation of the String module.

We're not tying ourselves to this - these are internal APIs so
we can change them in future.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]