Re: type inference problem in my ocaml program (program is very short)
- From: vesa.karvonen@xxxxxxxxxxxxxx
- Date: 15 Feb 2006 01:27:10 -0800
Dirk Thierbach kirjoitti:
But the point was to explain the basics, taking in accout the kind of
mistakes the original poster was making.
I always try to explain any shortcomings of code (the shortcomins that
I know of) that I post on usenet or any other forum. This has several
desirable effects including that
- it reduces the need for others to correct my code,
- it opens the door for further questions on the part of the person who
is asking for help, and
- it opens the door for others to show even better ways to solve the
problem.
I would recommend reading about the try-in-unless construct of
Benton and Kennedy:
I know the try-in-unless construct.
In general, when I reply to posts in usenet, I don't write them
specifically for one person. There is an exception, however. When I
post-and-mail, I intend the post as an open letter to one particular
recipient.
The above is problematic in that the file will not be properly closed
in case some exception other than End_of_file is raised,
Same here.
Not quite. I try very hard not to lie about the properties of code
that I post. IIRC, your comments on the code didn't indicate that it
would leak resources in some exceptional situations. I assume that you
understood the problem. Not mentioning important details like that can
lead others astray and the damage may be considerable.
If you want to present a good example for efficient waterproof code in
this situation that is easily understandable for a beginner, go ahead. :-)
I try very hard not to underestimate the intellectual capability of
others. For instance, in my reply I pointed to the Benton/Kennedy
article, which is probably not something that everyone can read at
their leisure (for me, reading it the first time required a fairly high
level of concentration). I expect (or wish) that others ask questions
on issues that they do not understand.
-Vesa Karvonen
.
- References:
- type inference problem in my ocaml program (program is very short)
- From: mneuhaber22@xxxxxxxxxx
- Re: type inference problem in my ocaml program (program is very short)
- From: Dirk Thierbach
- Re: type inference problem in my ocaml program (program is very short)
- From: Vesa Karvonen
- Re: type inference problem in my ocaml program (program is very short)
- From: Dirk Thierbach
- type inference problem in my ocaml program (program is very short)
- Prev by Date: Re: type inference problem in my ocaml program (program is very short)
- Next by Date: Re: type inference problem in my ocaml program (program is very short)
- Previous by thread: Re: type inference problem in my ocaml program (program is very short)
- Next by thread: Nondestructive database updates by using the time variable.
- Index(es):
Relevant Pages
|