4 ms·
I think the end result of something like this is call-by-meaning. Alan Kay and co. Have published several papers on this subject, but in a nutshell the code loo
by alexisread 7y ago
I think the end result of something like this is call-by-meaning. Alan Kay and co. Have published several papers on this subject, but in a nutshell the code looks for a matching function to a signature and return type, then calls it.
Obv. There are issues with this approach if fully automatic (how many sum functions take two ints and return int?) but there's no reason why we can't use a sig/return to filter on ie. The same function can be in 2 modules if filtering by sig or by return type.
With typing similar to Haskell we can be even more strict - the sig/return is a contract, and we can have multiple types like userInputInt, randomInt which can differentiate similar inputs.
With good typing and behavioural provability we may be able to move towards a call-by-meaning system