Lambda the Ultimate

inactiveTopic Infer: A Statically-typed Dialect of Scheme
started 1/2/2001; 2:14:33 PM - last post 1/3/2001; 5:29:53 AM
Ehud Lamm - Infer: A Statically-typed Dialect of Scheme  blueArrow
1/2/2001; 2:14:33 PM (reads: 718, responses: 5)
Infer: A Statically-typed Dialect of Scheme
Infer combines many (though not all) of the best features of Scheme and ML. Compared with latently-typed languages, such as Scheme, statically-typed languages, such as ML and Infer, sacrifice some expressive power in exchange for the ability to catch many errors at compile time, the possibility of more efficient execution, and some system-verified program documentation.
Posted to "" by Ehud Lamm on 1/2/01; 2:14:47 PM

pixel - Re: Infer: A Statically-typed Dialect of Scheme  blueArrow
1/3/2001; 2:36:34 AM (reads: 660, responses: 0)
What i found interesting and not available in ML:
- handling of optional and default arguments
- handling of polymorphic assignment. This is done in CAML (was it invented for CAML?)

What i found ugly is of course the syntax completly unreadable ;pp

andrew cooke - Re: Infer: A Statically-typed Dialect of Scheme  blueArrow
1/3/2001; 3:50:15 AM (reads: 650, responses: 0)
Optional and labelled args are available in OCaml 3.0 (apparently; I just updated to Woody last night to try and get OCaml 3.0 to find that it is only in unstable - I suspect it's waiting for the new X <- Debian specific rambling).

What is polymorphic assignment? (Is it related to the problem with restricting types when mutable values are involved (discussed at length in the Caml FAQ)?). If so, I never realised this wasn't in SML...

(Which syntax do you find unreadable? I used to find Lisp unreadable, but after writing a few programs it was a pleasure - very concise; now that I've started using OCaml the syntax that seemed ugly while reading Cousineau + Mauny is becoming more natural...)

pixel - Re: Infer: A Statically-typed Dialect of Scheme  blueArrow
1/3/2001; 4:19:49 AM (reads: 645, responses: 0)
For the default valued arguments, it's looks the same (except that ocaml values are named). For the rest arguments, ocaml is more powerful.
What i don't like about the labels in ocaml3 is that you need to put them everytime. And think that mapping function for "map" must be tagged:
map ~f:f l
Quite cumbersome :-(

pixel - Re: Infer: A Statically-typed Dialect of Scheme  blueArrow
1/3/2001; 4:32:28 AM (reads: 656, responses: 0)
Which syntax do you find unreadable?

Well, the tuple and record constructors, the '%' selector. The record variant seems like a way to have something readable on top of it, though it seems quite ad'hoc.

Another thing is the type signatures:

|- cons
: (proc ('a (list 'a)) (list 'a))
looks like hell to me. I agree that haskell is sometimes to sugared, but
 a -> [a] -> [a] 
is at least readable!

pixel - Re: Infer: A Statically-typed Dialect of Scheme  blueArrow
1/3/2001; 5:29:53 AM (reads: 690, responses: 0)
What is polymorphic assignment? (Is it related to the problem with restricting types when mutable values are involved (discussed at length in the Caml FAQ)?). If so, I never realised this wasn't in SML...

You're right, and as usual i should before posting...