It's becoming more clear to me that there's something lurking below the surface that relates contracts, foreign function interfaces, macros, and probably subtyping and (more speculatively) component systems in general: the notion of us versus them, negotiating our differences, and statically or dynamically keeping track of who we and they are. Contracts and foreign function interfaces keep track of us and them dynamically for the purpose of blame or conversion, respectively; a macro author builds up a semantic notion of us (the macro construct) versus them (the host language) that he or she then has to write a program to translate away. Subtyping contains a totally static version of the idea where we,an expression, may disagree with them, our context, about what our type is, but we can in some circumstances amicably resolve our differences.
I haven't worked out most of those examples yet, so I don't know if the connection is anything beyond superficial, but it seems pretty compelling to me after having worked out some toy examples. I'll have to investigate further.
I haven't worked out most of those examples yet, so I don't know if the connection is anything beyond superficial, but it seems pretty compelling to me after having worked out some toy examples. I'll have to investigate further.
0 Comments:
Post a Comment
<< Home