From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA14149; Tue, 6 Mar 2001 18:18:13 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA14383 for ; Tue, 6 Mar 2001 18:18:13 +0100 (MET) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f26HIBb01232; Tue, 6 Mar 2001 18:18:11 +0100 (MET) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id JAA21787; Tue, 6 Mar 2001 09:18:09 -0800 (PST) Date: Tue, 6 Mar 2001 09:18:09 -0800 (PST) From: Brian Rogoff To: Chris Hecker cc: Xavier Leroy , caml-list@inria.fr Subject: Re: [Caml-list] bigarrays and toplevel on Win32? In-Reply-To: <4.3.2.7.2.20010305091601.036cdef0@shell16.ba.best.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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