Browse thread
[Caml-list] Side effect in non-commutative context
-
Diego Olivier Fernandez Pons
- Diego Olivier Fernandez Pons
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@e...> |
| Subject: | Re: [Caml-list] Side effect in non-commutative context |
Bonjour,
I have been said privately that detecting side-effects may be quite
difficult.
Quid about the work done by François Pessaux and Xavier Leroy on
type-based analysis of uncaught exceptions (1998) ? Is it planned to
be added to the Caml compiler (I am of course directly interested
because heavy user of exceptions but I don't know how important this
is for typical Caml programs like symbolic computation, etc.)
An other point is that I meant of course compilation-time warnings.
let rec map f = function
| [] -> []
| head :: tail -> f head :: map f tail
Once a function like [map] is compiled there is no way to know if it
intented to be used in a commutative context or not. What I had in
mind was just propagating a "with-side-effects" tag in the inferred
type (that is more or less the way exceptions are handled in Pessaux
and Leroy's work, isn't it ?)
Diego Olivier
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners