Slashdot Mirror


mod_caml Comes Of Age

Richard W.M. Jones writes "mod_caml is a set of bindings between Objective Caml and the full Apache API. mod_caml 0.6 has bindings for the Apache API and a full Perl-like CGI and templating library. There's only two things you need to know about Objective Caml: it's a modern, fully-featured and highly-optimised language, and it has a good tutorial so Perl/Java/C/C++ programmers can join in the fun."

2 of 43 comments (clear)

  1. Re:Improved linkage by Anonymous Coward · · Score: 1, Funny
    Just because Java's slow doesn't make it a mixed paradigm language. While a true mix of functional, list, procedural, logical, and object orientated in a single language, with dynamic interpretation, would indeed be as slow as Java (well, almost as slow), Java manages to be slow without needing to implement so many levels of paradigminity. Using a dynamic object orientation methodology, Java is able to crawl simply by utilizing an ideologically bananas virtual machine architecture.

    I don't know why you'd think its chronic slowness would be for any other reason.

  2. Not tail-recursive by r6144 · · Score: 3, Funny
    Here is a tail-recursive version:
    let process_line () =
    try let s = read_line () in
    (true, 1,
    List.length (Str.split (Str.regexp "[ \t]+") s),
    (String.length s) + 1)
    with End_of_file -> (false, 0, 0, 0)
    ;;

    let rec wc (lines, words, chars) =
    match process_line () with
    (true, l, w, c) -> wc (lines + l, words + w, chars + c)
    | (false, _, _, _) -> (lines, words, chars)
    ;;
    let lines, words, chars = wc (0, 0, 0) in
    Printf.printf "%d %d %d\n" lines words chars
    ;;