Batteries: reworking the hierarchy (feedback wanted)

November 18, 2008 § Leave a comment

As readers interested in OCaml may know, we’ve been working for several months of OCaml Batteries Included. Early in the development, it appeared to us that, with the large number of modules involved, we would need a hierarchy of modules.

For instance, for the moment, we have a module System containing among other submodules IO (definition of i/o operations), File (definition of operations on files), Sys (the usual OCaml Sys module, soon to be expanded), etc.  Therefore, before one may open and manipulate files, one has to do

open System.IO;;
open System.File;;

or, with the syntax extension we developed to alleviate this,

open System, IO, File;;

the syntax extension does a few other things which we’re not going to detail here — for one thing, it allows local opening of modules).

Now that we’ve reached Alpha 2 and are well on our way towards Alpha 3, we’ve decided that it’s time to rework our current hierarchy and make it shorter and more consistent. Before we proceed, we’d like some feedback from the community. Discussion will take place mostly on the OCaml mailing-list and on irc (server: Freenode, channel: #ocaml) but I preferred posting the hierarchy here for easier reading.

At the moment, our hierarchy looks roughly as follows:

Batteries (automatically opened)

  1. Control
    1. Concurrency
      1. Common
      2. Threads
        1. Condition
        2. Event
        3. Mutex
        4. Thread
    2. Exceptions
    3. Return
    4. Monad
  2. Data
    1. Containers (common interfaces)
    2. Mutable
      1. Array
        1. Cap
          1. Labels
          2. ExceptionLess
        2. Labels
        3. ExceptionLess
      2. Bigarray
        1. Array1
        2. Array2
        3. Array3
        4. Genarray
      3. Dllist
      4. Dynarray
      5. Enum
        1. ExceptionLess
      6. Global
      7. Hashtbl
        1. Make
          1. Labels
          2. ExceptionLess
      8. RefList
        1. Index
      9. Queue
      10. Ref
      11. RefList
      12. Stack
      13. Stream
    3. Logical
      1. Bool
      2. BitSet
    4. Numeric
      1. Big_int
      2. Common
      3. Complex
      4. Float
      5. Int
      6. Int32
      7. Int64
      8. Native_int
      9. Num
      10. Safe_int
      11. Unit
      12. Common
    5. Persistent
      1. Lazy
      2. List
        1. ExceptionLess
        2. Labels
      3. Map
        1. Make
          1. ExceptionLess
          2. Labels
      4. Option
        1. Labels
      5. PMap
      6. PSet
      7. Set
        1. Make
          1. ExceptionLess
          2. Labels
    6. Text
      1. Buffer
      2. Char
      3. UTF8
      4. Rope
      5. UChar
      6. String
        1. ExceptionLess
        2. Labels
  3. Languages
    1. CharParser
    2. Genlex
      1. Languages
        1. Library
          1. C
          2. OCaml
    3. Format
    4. Lexing
    5. ParserCo
      1. Source
    6. Parsing
    7. Printf
    8. Scanf
      1. Scanning
    9. SExpr
    10. Str
  4. Meta
    1. Callback
    2. CamlinternalMod
    3. CamlinternalOo
    4. Gc
    5. Obj
    6. Oo
    7. Weak
      1. Make
  5. Standard (automatically opened)
  6. System
    1. Arg
    2. Compress
      1. GZip
    3. File
    4. Filename
    5. IO
      1. BigEndian
    6. Network (placeholder)
    7. OptParse
      1. Opt
      2. OptParser
      3. StdOpt
    8. Unix
      1. Labels
    9. Sys
  7. Toolchain
    1. Execute
    2. Findlib
  8. Util
    1. Digest
    2. Random
      1. State
  9. Legacy

One possible replacement has been drafted:

  1. Control
    1. Concurrency
      1. Common
      2. Threads
        1. Condition
        2. Event
        3. Mutex
        4. Thread
      3. Exceptions
      4. Return
      5. Monad
  2. Data
    1. Containers
      1. Common
      2. Array
        1. Cap
          1. ExceptionLess
          2. Labels
        2. ExceptionLess
        3. Labels
      3. Bigarray
        1. Array1
        2. Array2
        3. Array3
        4. Genarray
      4. Dllist
      5. Dynarray
      6. Enum
        1. ExceptionLess
        2. Labels
      7. Global
      8. Hashtbl
        1. Make
          1. ExceptionLess
          2. Labels
      9. Lazy
      10. List
        1. ExceptionLess
        2. Labels
      11. Map
        1. Make
          1. ExceptionLess
          2. Labels
      12. Option
        1. Labels
      13. PMap
      14. PSet
      15. RefList
        1. Index
      16. Queue
      17. Ref
      18. RefList
      19. Set
      20. Make
        1. ExceptionLess
        2. Labels
      21. Stack
      22. Stream
    2. Logical
      1. Bool
      2. BitSet
      3. Unit
    3. Numeric
      1. Interfaces (formerly Common)
      2. Big_int
      3. Common
      4. Complex
      5. Float
      6. Int
      7. Int32
      8. Int64
      9. Native_int
      10. Num
      11. Safe_int
    4. Text
      1. Buffer
      2. Char
      3. UTF8
      4. Rope
      5. UChar
      6. String
        1. Labels
  3. Distro
    1. Packages (formerly Findlib)
    2. Tools (formerly Execute)
  4. Internals
    1. Callback
    2. Gc
    3. Mod (formerly CamlinternalMod)
    4. Obj
    5. Oo
      1. Private (formerly CamlinternalOo)
    6. Weak
      1. Make
  5. IO
    1. BigEndian
    2. Gzip
    3. Bz2
    4. Zip
    5. Transcode (placeholder)
  6. Network (placeholder)
  7. Text (formerly Languages)
    1. Lex
      1. Genlex
        1. Languages
          1. C
          2. OCaml
      2. Lexing
    2. Parse
      1. CharParser
      2. UCharParser
      3. ParserCo
        1. Source
      4. Parsing
    3. Pretty
      1. Format
    4. Printf
    5. Regexp
      1. Str
      2. PCRE (in the future)
    6. Scanf
      1. Scanning
    7. SExpr
    8. XML (placeholder)
  8. Standard (automatically opened)
  9. Sys
    1. Arg
    2. File
    3. OptParse
      1. Opt
      2. OptParser
      3. StdOpt
    4. Path (formerly Filename)
    5. Shell (formerly Sys)
    6. Unix
      1. Labels
  10. Util
    1. Digest
    2. Random
      1. State
  11. Legacy

The overall goal, with this new version, is to make for

  • a shallower hierarchy
  • shorter module names
  • more consistent groups of modules.

What do you think of this replacement? Is it any better?

Tagged: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Batteries: reworking the hierarchy (feedback wanted) at Il y a du thé renversé au bord de la table.

meta

%d bloggers like this: