Browse thread
Locally-polymorphic exceptions [was: folding over a file]
[
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: | rossberg@p... |
| Subject: | Re: [Caml-list] Unsoundness is essential |
skaller wrote: > >> Exceptions are /trapped/ errors. > > I chose not to accept that definition. I use instead > "trapped at compile time", meaning "in advance of running > the program". As a definition for what? > Otherwise you could say dynamically typed languages were > strongly typed and sound. In fact, technically, they are. People have used the term "unityped" for it. > C/C++ does this right: if a program is 'ill-formed' then > a diagnostic must be issued. Throwing an exception silently > is NOT allowed. [C/C++ doesn't mandate diagnostics always because > some are too hard to detect] This paragraph sounds like a contradiction in itself. More importantly, an OCaml program performing div 0 isn't "ill-formed", it has a perfectly well-defined, safe semantics (in precisely the same way as adding a string in Python). See the library docs. - Andreas