Hi,

Our documentation could be improved. The page describing the
programming language and its type system, in particular, would deserve
some more details, example and a better organization. Nevertheless,
you will find answers to most of your questions there:
  http://savonet.sourceforge.net/doc-svn/language.html

In short, stream*stream is a pair of streams. It's different from a
list, which could have any number of items, not necessarily two. Next,
(?id:string,...)->... is the type of a function that accepts an
optional argument labelled id, of type string.

Surprisingly, there doesn't seem to be any explanation of what 'a
means in the doc! It's polymorphism (think "generics" if you're a java
programmer): 'a denotes a variable that may be substituted by
anything. For example, list.length has type (['a])->int, saying that
it accepts one argument of type [X] for any X, and returns an integer.
The first projection, fst, has type (('a*'b))->'a, meaning that it
takes a pair whose elements have any types X and Y respectively, and
returns an element of type X (the type of the first element).

One more thing about functions, if you're familiar to C, Java and such
languages: if you read that a function has type (...)->..., for
example, plus : (int,int)->int, you can think of it as the prototype
int plus(int x, int y) -- the names x and y are irrelevant.

I hope this helps. Don't hesitate to ask more questions, propose tutorials, etc.
-- 
David

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to