ocamllabs/ocaml-ctypes — pull request #61 by yallop (2013-08-13 13:36:39+00:00)
Title: Compulsory field names.

Make struct and union field names compulsory, to make stub generation a possibility, and improve formatting in the top level. The syntax is slightly heavier, since the field addition operator is now ternary (taking the struct or union, the label and the field type). You might write:

```ocaml
let tm = structure "tm"
let (-:) ty = field tm ty
let tm_sec = int -: "tm_sec"
let tm_min = int -: "tm_min"
let tm_hour = int -: "tm_hour"
...
let () = seal tm
```

or perhaps

```ocaml
let tm = structure "tm"
let tm_sec = field tm int "tm_sec"
let tm_min = field tm int "tm_min"
let tm_hour = field tm int "tm_hour"
...
let () = seal tm
```
instead of what we had previously:

```ocaml
let tm = structure "tm"
let tm_sec = tm *:* int
let tm_min = tm *:* int
let tm_hour = tm *:* int
...
let () = seal tm
```

`(*:*)` and `(+:+)` are still supported for the moment, but deprecated.