[m-dev.] arrays

Ian MacLarty maclarty at cs.mu.OZ.AU
Sun Aug 1 15:14:05 AEST 2004


I was wondering if there'd be any problems dealing with arrays the same 
way we currently deal with IO?  This might be a safe way to implement 
arrays until uniqueness works.

The big warning in the current array library documentation discourages 
their use - especially if you are new to mercury.

Sure, you'd have to pass a state pair to array__lookup, even though the 
array isn't changing, but with state variable notation I don't see this 
as much of an issue.  And of course you wouldn't be able to backtrack 
over arrays, but you can't do that now anyway (can you?).

It'd be nice to know the compiler is checking that you're not using 
arrays incorrectly - which is not the case at the moment as I 
understand it.


mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list