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: 961 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Thierry Boy de la Tour
Version: 3.04, 2.04
OS: linux, solaris
Submission from: pc-atinf2.imag.fr (147.171.130.142)
Hello,
I recently forgot a semicolon in a program, and got very strange results,
and a discrepancy of behaviour between bytecode and native code. This
discrepancy seems to be due to a difference in the evaluation order of
function arguments. Here is a simple instance:
try raise Exit (print_string "no ")
with Exit ->
print_string "smoking";
print_newline ();;
you get either "smoking" or "no smoking" depending on the compiler. My opinion
however is that the type checker should reject this expression (as would be
the case with another function call). It would give the user a better chance
to add the missing semicolon.
Best regards,
Thierry
The text was updated successfully, but these errors were encountered:
Original bug ID: 961
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Thierry Boy de la Tour
Version: 3.04, 2.04
OS: linux, solaris
Submission from: pc-atinf2.imag.fr (147.171.130.142)
Hello,
I recently forgot a semicolon in a program, and got very strange results,
and a discrepancy of behaviour between bytecode and native code. This
discrepancy seems to be due to a difference in the evaluation order of
function arguments. Here is a simple instance:
try raise Exit (print_string "no ")
with Exit ->
print_string "smoking";
print_newline ();;
you get either "smoking" or "no smoking" depending on the compiler. My opinion
however is that the type checker should reject this expression (as would be
the case with another function call). It would give the user a better chance
to add the missing semicolon.
Best regards,
Thierry
The text was updated successfully, but these errors were encountered: