4 ms·
wether names are part of signatures is not merely syntax, as the article argues, but very much a semantic issue. It intrudces a translation step from one enviro
by CuriousSkeptic 11y ago
wether names are part of signatures is not merely syntax, as the article argues, but very much a semantic issue. It intrudces a translation step from one environment to another by translating selected parts of it to and from a list. Which forces us into odd semantics of order in places where order usually does not matter. While at the same time throwing away any semantics of naming, usually much more important.
Besides the usability issue of introducing the wrong order as noted by the article, it also makes a mess of things like partial application and composition. Consider a language like Haskell where this is a fundamental part how you design function signatures. There is a function for swapping argument order just to make this work. [1]
Had the semantics of the language instead considers binding names more important than ordering there would be no need for that. A -> B -> C would already equal B -> A -> C. In fact you could throw away things like curry and uncurry too if you treated tuples as records, {A,B} -> C would also equal A -> B -> C
Of course now binding names would be much more important than ordering, so something like a rename function would probably still be needed. But it couldn't be much worse than all the workarounds for ordering currently introduced.
[1] http://stackoverflow.com/questions/12129029/how-to-change-the-order-of-arguments http://stackoverflow.com/questions/12129029/how-to-change-th...