From: Brian Rogoff <bpr@best.com>
To: Chris Hecker <checker@d6.com>
Cc: Xavier Leroy <Xavier.Leroy@inria.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] bigarrays and toplevel on Win32?
Date: Tue, 6 Mar 2001 09:18:09 -0800 (PST) [thread overview]
Message-ID: <Pine.BSF.4.21.0103060908580.26093-100000@shell5.ba.best.com> (raw)
In-Reply-To: <4.3.2.7.2.20010305091601.036cdef0@shell16.ba.best.com>
On Mon, 5 Mar 2001, Chris Hecker wrote:
> >The party line on unsafe array accesses is unclear: on the one hand,
> >we do not want to encourage their use, as it can break type safety and
> >dramatically reduce the safety of the programs; on the other hand,
> >they are handy when benchmarking against C or Fortran :-)
>
> I'd like to have the choice. I prefer unsafe_get/unsafe_set to -unsafe
> because it lets me choose where to be risky.
It puts the annotation directly in the source code, so if you change your
mind or want to experiment you have to change the source. You have control
over where to be risky by using top level modules. With extra work, you
could recover the same level of control using this approach.
I think it's cleaner to push this issue as much as possible to the
compiler and rely on compiler options, otherwise the language will need to
have unsafe_everything operations for every possible op that you want fast.
On a related issue, it might be nice to put Obj.magic in all it's guises
into a suitably disgustingly named module (Unsafe_operations?) so people
aren't tempted to use it just to pass the typechecker ;-)
-- Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-03-06 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-05 7:43 Chris Hecker
2001-03-05 16:57 ` Xavier Leroy
2001-03-05 17:37 ` Chris Hecker
2001-03-06 17:18 ` Brian Rogoff [this message]
2001-03-05 20:52 ` Bruce Hoult
2001-03-05 21:28 ` John Prevost
2001-03-07 16:00 ` Dan Grossman
2001-03-07 21:04 ` John Prevost
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=Pine.BSF.4.21.0103060908580.26093-100000@shell5.ba.best.com \
--to=bpr@best.com \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=checker@d6.com \
/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