Hey, I am using maps and it turns out that it takes a lot of code to write something simple. For example, even though I want to use find function, I need to specify exact module. For example, if I have a
let x = IntMap.find k string_map
let y = StringMap.find k int_map
Is there a way to avoid using different modules for find, and maybe use something general like Map.find ? Shall I switch to Base: I believe in Base one can use Map.find everywhere.
There’s this saying that most importantly your code should be easy to read. Code readability is a tough question and answers vary from one person to another, but I think it doesn’t reduce to writing concise code. Having the module names hinting at the types that are used in some code is in my experience very helpful when you try to understand it. IMO the few extra-characters you type are absolutely worth the trouble in the long run, and personally I’d prefer to read a version with the explicit StringMap and IntMap names.