List Info

Thread: "ocaml_beginners"::[] silly naming convention question




"ocaml_beginners"::[] silly naming convention question
user name
2006-12-29 21:36:50

Maybe my google-fu is off today, but is there any significance to the 'labl' prefix that some libraries use? When should (or shouldn't) I use it myself?

-Grant

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] silly naming convention question
user name
2006-12-29 22:30:33

On Fri, 29 Dec 2006, olsongt%40verizon.net">olsongtverizon.net wrote:

> Maybe my google-fu is off today, but is there any significance to the
> 'labl' prefix that some libraries use? When should (or shouldn't) I use
> it myself?

A long long time ago, there were no labelled arguments in OCaml, and no
polymorphic variants either. However there was a was a dialect of OCaml
which was called olabl and was providing these features:

http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/

Some library interfaces were rewritten using these new features, hence
their name (e.g. camltk -> labltk). From OCaml 3, labelled arguments and
polymorphic variants have been part of the official language, and the
labl* libraries are normal OCaml libraries.

Martin

--
Martin Jambon
http://martin.jambon.free.fr

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] silly naming convention question
user name
2006-12-29 22:40:07

On Fri, 29 Dec 2006, olsongt%40verizon.net">olsongtverizon.net wrote:

> Maybe my google-fu is off today, but is there any significance to the
> 'labl' prefix that some libraries use? When should (or shouldn't) I use
> it myself?

To answer your question: you can give the name you like to your libraries,
unless it is already taken. Beware of the possible namespace clashes:
either prefix each of your modules with the name of your library, e.g.
Foo_lexer, Foo_parser, Foo_list, ...
or put the modules into a single big module using the -pack option of the
compiler, so that you get Foo.Lexer, Foo.Parser, Foo.List, etc.

Martin

--
Martin Jambon
http://martin.jambon.free.fr

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )