Overloaded functions to discriminate between memory and storage

Assume a string ar, and a function that determines whether or not a value is in ar.

If my find function looks like this:

function find(string[] storage ar, string memory findString) public pure returns(bool) {...}`

And I have function like

function handleArray(string[] memory myArray) {
    require(find(myArray, "myValue"), "myValue not found");`
    [do something]
}

So, handleArray won’t compile with error invalid type conversion from string[] memory to string storage ref[].

OK, fair enough, so if I overload find with

function find(string[] memory ar, string memory findstring) public pure returns(bool){...}`

That should work, logically anyway. But it doesn’t No unique declaration after argument dependent lookup. Which seems inconsistent if the compiler can find the error when the localtion differs, but can’t discriminate between the two functions, based on the supplied parameter location.

So that forces me to write to different function which do the same thing, only the param type is different, which I thought was the point of function overloading.

function findInMemoryArray(string[] memory ar...`
function findInStorageArray(string[] storage ar..`

And then I have to remember which one to call based on the location of the array I am looking in. Seems like it shouldn’t be too hard since the compiler is checking anyway.

It would be good if this was made unecessary, so as to avoid the code bloat

You are totally right. Here is the relevant issue: https://github.com/ethereum/solidity/issues/1256
As this has been requested multiple times now, it should be implemented soon.