I understand that a MethodID is derived from a function signature and used so that a particular contract function can be specified in the "data" attribute of a transaction. But I'm not sure why this design choice was made rather than using an encoding of the function signature itself. If that were done, I assume the additional step of publishing an ABI for others to use wouldn't be necessary, as one could decode the function signature to get the plain text name and parameters.
My only guess is that using the keccak256 hash ensures a fixed length representation of any method name. Is it that having a dynamically sized identifier for functions would make things less efficient or more complicated? I know that encoding dynamic parameters for function calls require extra metadata as well more complex storage requirements.
foo(uint256) -> 0x2fbebd38 Pro: Fixed length Con: Can't derive function signature vs. foo(uint256) -> 0x666f6f2875696e7432353629 Pro: Can derive function signature Con: Dynamic in size