[m-dev.] bimap

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jan 8 20:38:00 AEDT 2004


On 08-Jan-2004, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > An alternative that would be slightly better for backwards compatibility
> > export bimap/2 as a function (with both forwards and reverse modes),
> > rather than a constructor, but to then use `pragma obsolete' to deprecate it.
> > This would require renaming the bimap/2 constructor, e.g to bimap_ctor/2
> > or mk_bimap/2.
> 
> The problem is that taking two existing maps and simply joining them to
> make a bimap is fundamentally unsafe. To make it safe, [...]

We're talking about a procedure that would immediately be deprecated.
It's not important to make deprecated procedures safe.  All it needs to
do is to emulate the previous behaviour as closely as possible.
(Adding a new safety check would damage backwards compatibility!)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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