{"title":"超元编程的编译器设计","authors":"Lucian Radu Teodorescu, R. Potolea","doi":"10.1109/SYNASC.2013.34","DOIUrl":null,"url":null,"abstract":"Although static metaprogramming is not a new technique and is present in some of the most popular programming languages today, it is still considered an esoteric feature. This is mainly because writing metaprograms requires syntactic constructs and programming abstractions different from those used for writing regular programs. We propose in this paper the concept of hyper-metaprogramming, a new kind of Turing-complete compile-time metaprogramming, which allows metaprograms to be written in the same way as traditional programs: with the same abstractions, syntax, and semantics. Using this feature, programmers can easily implement any complex algorithms and data structures at compile-time, before producing the final run-time program. The paper focuses on discussing the main mechanisms involved in implementing hyper-metaprogramming.","PeriodicalId":293085,"journal":{"name":"2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing","volume":"30 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Compiler Design for Hyper-metaprogramming\",\"authors\":\"Lucian Radu Teodorescu, R. Potolea\",\"doi\":\"10.1109/SYNASC.2013.34\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Although static metaprogramming is not a new technique and is present in some of the most popular programming languages today, it is still considered an esoteric feature. This is mainly because writing metaprograms requires syntactic constructs and programming abstractions different from those used for writing regular programs. We propose in this paper the concept of hyper-metaprogramming, a new kind of Turing-complete compile-time metaprogramming, which allows metaprograms to be written in the same way as traditional programs: with the same abstractions, syntax, and semantics. Using this feature, programmers can easily implement any complex algorithms and data structures at compile-time, before producing the final run-time program. The paper focuses on discussing the main mechanisms involved in implementing hyper-metaprogramming.\",\"PeriodicalId\":293085,\"journal\":{\"name\":\"2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing\",\"volume\":\"30 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2013-09-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SYNASC.2013.34\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SYNASC.2013.34","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Although static metaprogramming is not a new technique and is present in some of the most popular programming languages today, it is still considered an esoteric feature. This is mainly because writing metaprograms requires syntactic constructs and programming abstractions different from those used for writing regular programs. We propose in this paper the concept of hyper-metaprogramming, a new kind of Turing-complete compile-time metaprogramming, which allows metaprograms to be written in the same way as traditional programs: with the same abstractions, syntax, and semantics. Using this feature, programmers can easily implement any complex algorithms and data structures at compile-time, before producing the final run-time program. The paper focuses on discussing the main mechanisms involved in implementing hyper-metaprogramming.