Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] productivity improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: hao-yang_wang@f...
Subject: Re: [Caml-list] Re: Statically detecting arrays bound exceptions ?? (was: Universal Serializer)
> > >Hey, wait a minute, how do you plan to statically detect bounds
exceptions
> > > ? It's as undecidable as detecting infinite recursions.
> >
> > Nah. Just depends on your mindset.
> > In Pascal, array indexes have a specific type,
> > (possibly a subrange type). So it isn't possible to
> > get an array bounds error, only a type error
> > if the index is the wrong type.
>
> What about defining type that are subranges of int ?
> à la ADA...

Then how do you make sure that the result of an arithmetic expression is
still within that sub-range? For example, m.( i + j ) ?

Cheers,
Hao-yang Wang
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners