Unique Identifiers in Pure Functional Languages

msra

引用 23|浏览1
暂无评分
摘要
It is hard to use properties of memory locations in functional languages. One such property is that memory locations are unique identifiers of o bjects, i.e., two objects are equal if they have the same memory address. I introduce a syntactic sugar called new in a pure functional language. new provides easy-to-use unique identifiers for expressions. I show moreover that if we use graph rewriting during the compilation, compilation ofnew can be optimised such that the final imperative code use memor y locations for identification. Finally I give a prototype imp lementation of the language in Clean with ABC code. The introduced syntactic sugar can be expressed in the ν-calculus. The difference is that identifiers are hidden by new and the usage ofnew is forced to be more explicit by a so-called new-propagation rule. Due to this two restrictions, new fits better in functional programming than the ν-calculus.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要