From: dmitry grebeniuk <gdsfh1@gmail.com>
To: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] writing some code using a function for which only the signature is known
Date: Fri, 21 Jan 2011 20:26:06 +0200 [thread overview]
Message-ID: <AANLkTi=Hi7FHD5h9GrRxw-QM83xPTN2nAyM5dGSTcNLK@mail.gmail.com> (raw)
In-Reply-To: <20110121153252.GB1729@siouxsie>
Hello.
>> let myfunc _myparam1 _myparam2 = notimpl "myfunc"
> In the case of non implemented functions I would prefer to see the
> raisement of an exception in the code, and not covering it with
> a wrapper function.
It's a matter of taste. The function with name "notimpl"
or "not_implemented" doesn't affect readability, as for me.
Only convenience and flexibility (for example, I can change
the body of "notimpl" function to make the action depend
on the name of undefined function; of course, the last
step will be the same: aborting computations, either
raising exception or aborting the program with exit()).
>> Notice the first underscores in arguments' names: they
>> are here to suppress warnings about unused bindings
>> (really, these bindings are unused in this function).
> Beginning underlines do suppress warning messages?
Yes, if you have this warning enabled. Nice feature:
you can enable this warning to catch logic errors in
the code, and ignore unused bindings you have specified
manually.
next prev parent reply other threads:[~2011-01-21 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 5:40 Francois Berenger
2011-01-21 5:58 ` oliver
[not found] ` <AANLkTikv07AgCJXKD_e_QvGGz5245svFGiTG85fpZC7P@mail.gmail.com>
2011-01-21 6:12 ` dmitry grebeniuk
2011-01-21 15:32 ` oliver
2011-01-21 18:26 ` dmitry grebeniuk [this message]
2011-01-21 10:56 ` Arlen Cuss
2011-01-21 13:49 mark
2011-01-21 15:20 ` Daniel Bünzli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=Hi7FHD5h9GrRxw-QM83xPTN2nAyM5dGSTcNLK@mail.gmail.com' \
--to=gdsfh1@gmail.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox