Tags:compile time computation, metaobject protocol and Perl 6
Abstract:
With the ever-growing complexity of software systems already built and, more importantly, needing to be built in future, the need for research toward better methodologies, approaches and architectures is hard to overestimate. Ideas of novel software writing techniques are often implemented in tools in order to test out the pros and cons of the new technique, which may become generally accepted in the case of its successful application. This paper demonstrates a real world application of a recently introduced approach to the development of software libraries using advanced metaprogramming features that are present in some programming languages, notably in a recently released language called Perl 6. This research takes as a subject a well-developed problem, ASN.1 (The Abstract Syntax Notation One) implementation, with two approaches to writing a solution being common, and depicts resulting disadvantages of those approaches. Next, it describes how the use of metaprogramming in Perl 6 allows mitigating such problems, along with obstacles encountered during the development process. A number of software libraries were designed and implemented utilizing this approach, and it is used as a part of ASN.1 support for the Perl 6 language. A brief explanation of the solution’s internal architecture and ideas about possible future improvements are provided.
Advantages of Programmable Compile Time with Metaprogramming: the Case of ASN.1 and Perl 6