share implementation of Map.{create,open_existing}
try to simplify phantom types
Now with phantom types removed from Env.t and Map.t, less subtyping casts are required. Some are still needed when creating read-only cursors on read-write environments.
But what to do with Txn.go and its optional perm parameter?
If we leave it as-is, the default-behaviour for ?perm:None will be a read-write transaction, even on read-only environments. Is this what we want?
I would rather keep the parameter obligatory and unlabeled. Txn.go Ro and Txn.go Rw are concise statements.
Based on #18.
Now with phantom types removed from Env.t and Map.t, less subtyping casts are required. Some are still needed when creating read-only cursors on read-write environments.
But what to do with
Txn.go
and its optionalperm
parameter? If we leave it as-is, the default-behaviour for?perm:None
will be a read-write transaction, even on read-only environments. Is this what we want? I would rather keep the parameter obligatory and unlabeled.Txn.go Ro
andTxn.go Rw
are concise statements.