Amazon.com Widgets

what’s wrong with this picture?


let () =
  Arg.parse specl anonfun usage_msg;
  match List.rev !anonargs with
  | [] -> Arg.usage specl usage_msg; exit 1
  | args ->
     begin
       match !conf with None -> () | Some conf -> do_config conf;
       let string = "world" in
       printf "hello %s\n%!" string;
     end

2 Responses to “what’s wrong with this picture?”

  1. William Says:

    No conf!? Goodbye world!

    (Answer: your indentation mode is misleading :P )

  2. qxzn Says:

    > (Answer: your indentation mode is misleading :P )

    I guess that’s one way of looking at it. If you’d asked me, though I would have said OCaml’s syntax is broken.

    If OCaml required a terminator for match and if expressions, my #1 source of silly bugs would go away.

Leave a Reply