Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Printing text with holes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] Printing text with holes
Martin Jambon wrote:
> Hello,
> I am curious to know what people use to print long text written in a
> natural language, and containing many holes, like dynamically generated
> web pages.

I just used HereDoc to create a set of web pages, and found it pleasant 
to work in.

I used his old codebase, instead of the alpha version, since it looks 
like the alpha version hasn't been touched in 2 years.

He has a syntax like yours:

<< Hello, $firstname $lastname. >>


<< I am $$ string_of_int age $$ years old >>

He doesn't appear to have any syntactic sugar for conversions.  Which 
wasn't a problem.

He has constructs for creating loops, and the ability to include 
templates from other files.

He's also abstracted out the printing so that you can tell it where you 
want to send the generated text.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: