Oleg has an interesting piece that I haven't found mentioned on LtU (though it dates from 2000):
Blending static and dynamic typing: Scheme programming in ML
We show several examples of writing ML (OCaml) code in the style of Scheme programs, taking the fullest advantage of latent typing and placing no type annotations. The ML code features:
- intentionally polymorphic functions: Scheme display
- lists of variously intentionally typed elements
- functions with a variable number of polymorphic arguments: *
- self-application combinator
- higher-order polyvariadic intensionally polymorphic function: Scheme for-each
[...]
The code is trivial -- and that is the point. Defining and using the Universal type in a statically typed language is indeed embarrassingly easy. The code has not a single type annotation, and looks as dynamically typed as Scheme code. The source language is still OCaml, with static typing present and available to the programmer. Thus ML offers a blend of dynamic and static type programming; it's a programmer who chooses the proportions of this blend.
(disclaimer: I'm not posting this to start another religious battle, but as an interesting example)
Recent comments
16 weeks 2 days ago
20 weeks 4 days ago
22 weeks 1 day ago
22 weeks 1 day ago
24 weeks 6 days ago
29 weeks 3 days ago
29 weeks 3 days ago
29 weeks 6 days ago
29 weeks 6 days ago
32 weeks 5 days ago