You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3568 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general) Monitored by: marc
Bug description
Full_Name: Marc Herbert
Version: 3.08.2
OS: linux
Submission from: lns-vlq-37-lyo-82-253-101-87.adsl.proxad.net (82.253.101.87)
"Indeed, narrowing coercions would be unsafe, and could only be combined with
a type case, possibly raising a runtime error. However, there is no such
operation available in the language."
type case -> type cast ?
#class c0 = object method m = {< >} method n = 0 end;;
class c0 : object ('a) method m : 'a method n : int end
The object type c is an abbreviation for <m : 'a; n : int> as 'a.
type c -> type c0 ?
The text was updated successfully, but these errors were encountered:
J'ai aussi change l'explication de pourquoi il n'y a pas de downcast en caml.
Indeed, narrowing coercions without runtime checks would be unsafe.
Runtime type checks might raise exceptions, and they would require
the presence of type information at runtime, which is not the case in
the Objective Caml system.
For these reasons, there is no such operation available in the language.
Original bug ID: 3568
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Monitored by: marc
Bug description
Full_Name: Marc Herbert
Version: 3.08.2
OS: linux
Submission from: lns-vlq-37-lyo-82-253-101-87.adsl.proxad.net (82.253.101.87)
http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:using-coercions
Reference manual, section 3.12 "using coercions"
a type case, possibly raising a runtime error. However, there is no such
operation available in the language."
type case -> type cast ?
class c0 : object ('a) method m : 'a method n : int end
The object type c is an abbreviation for <m : 'a; n : int> as 'a.
type c -> type c0 ?
The text was updated successfully, but these errors were encountered: