The Design of Terra: Harnessing the Best Features of High-Level and Low-Level Languages

Zach DeVito, P. Hanrahan
{"title":"The Design of Terra: Harnessing the Best Features of High-Level and Low-Level Languages","authors":"Zach DeVito, P. Hanrahan","doi":"10.4230/LIPIcs.SNAPL.2015.79","DOIUrl":null,"url":null,"abstract":"Applications are often written using a combination of high-level and low-level languages since it allows performance critical parts to be carefully optimized, while other parts can be written more productively. This approach is used in web development, game programming, and in build systems for applications themselves. However, most languages were not designed with interoperability in mind, resulting in glue code and duplicated features that add complexity. We propose a two-language system where both languages were designed to interoperate. Lua is used for our high-level language since it was originally designed with interoperability in mind. We create a new low-level language, Terra, that we designed to interoperate with Lua. It is embedded in Lua, and meta-programmed from it, but has a low level of abstraction suited for writing high-performance code. We discuss important design decisions ‐ compartmentalized runtimes, glue-free interoperation, and meta-programming features ‐ that enable Lua and Terra to be more powerful than the sum of their parts. 1998 ACM Subject Classification D.3.3 Language Constructs and Features","PeriodicalId":231548,"journal":{"name":"Summit on Advances in Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Summit on Advances in Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.SNAPL.2015.79","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

Applications are often written using a combination of high-level and low-level languages since it allows performance critical parts to be carefully optimized, while other parts can be written more productively. This approach is used in web development, game programming, and in build systems for applications themselves. However, most languages were not designed with interoperability in mind, resulting in glue code and duplicated features that add complexity. We propose a two-language system where both languages were designed to interoperate. Lua is used for our high-level language since it was originally designed with interoperability in mind. We create a new low-level language, Terra, that we designed to interoperate with Lua. It is embedded in Lua, and meta-programmed from it, but has a low level of abstraction suited for writing high-performance code. We discuss important design decisions ‐ compartmentalized runtimes, glue-free interoperation, and meta-programming features ‐ that enable Lua and Terra to be more powerful than the sum of their parts. 1998 ACM Subject Classification D.3.3 Language Constructs and Features
Terra的设计:利用高级和低级语言的最佳特性
应用程序通常使用高级和低级语言的组合编写,因为它允许对性能关键部分进行仔细优化,同时可以更有效地编写其他部分。这种方法用于web开发、游戏编程和为应用程序本身构建系统。然而,大多数语言在设计时并没有考虑到互操作性,这导致了粘合代码和重复的特性,增加了复杂性。我们提出了一个两种语言的系统,其中两种语言都被设计为互操作。Lua用于我们的高级语言,因为它最初设计时就考虑到互操作性。我们创建了一种新的低级语言Terra,我们设计它与Lua进行互操作。它嵌入在Lua中,并从中进行元编程,但具有适合编写高性能代码的低抽象级别。我们讨论了重要的设计决策——划分的运行时、无胶互操作和元编程特性——这些使Lua和Terra比它们各自部分的总和更强大。1998 ACM主题分类D.3.3语言结构和特征
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信