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

Re: "weird" naming convention for ocamlbuild executables



On 6/15/07, Christian Stork <cstork@ics.uci.edu> wrote:
On Thu, Jun 14, 2007 at 09:11:11PM +0100, Stefano Zacchiroli wrote:
> Hi Nicolas,
>   I've another question related to the packaging / distribution of ocaml
> 3.10.0.
>
> ocamlbuild comes shipped as 3 executables:
> - /usr/bin/ocamlbuild.byte
> - /usr/bin/ocamlbuild.native
> - /usr/bin/ocamlbuild
> with the latter being the best among the first two.
>
> That's fine per se, but breaks what it seems like to be a "convention"
> in the distribution of other ocaml tools. All compilers for example
> follow the convention of no extension for the bytecode version and .opt
> for the native version, some goes for the new camlp4 executables.
>
> Any reason for breaking this internal convention? Wouldn't it be better
> to adopt it for ocamlbuild as well (which is what we are actually doing
> in the Debian package)?

I would really argue against reverting back to the old convention.  On
the contrary, I think it is time to switch to the new "weird"
convention, which is actually the only reasonable one.  It makes no
sense to always have to check for *.opt versions of executables when one
simply wants the fastest available version.  A link as provided by
ocamlbuild is the best solution for this most common use case.  The old
convention seems to be a historical accident as ocamlc was there before
ocmalc.opt.

Yes that's the reason. This convention could even be applied to all
others programs in next revisions.

However, why not use *.opt instead of *.native for some degree of
backward compatibility?

It's to enforce that the binary is not especially optimized, it's
compiled to native code. And I think I can prevent some
misunderstandings.

--
Nicolas Pouillard



Reply to: