2010AIP conference proceedingsRequires access

The preliminary investigation of template with C++

Shruti Sandal, Raghuraj Singh, Abdul Jabbar Khilji, Shashi Shekhar Ranga, Sanjay Tejasvee, Devendra Gahlot, R. B. Patel, Bhupendra Singh

Open publisher page 0 citations

Abstract

This paper describe the relationship between C++ templates and partial evaluation. In C++, templates were designed to support generic programming, but not deliberately provided the ability to perform compile‐time computations and code generation. These features are completely deliberate, and as a result their syntax is ill at ease. After a review, these features in terms of partial evaluation, a much simpler syntax can be achieved. In C++, it may be regarded as a two‐level language in which types are first‐class values. Template instantiation resembles an offline partial assessor. In this paper, we explain groundwork in the direction of a single mechanism based on Partial Evaluation which unifies generic programming, compile‐time computation and code generation. The language Catat is introduced to demonstrate these ideas.

About this research paper

What this paper is about

This paper describe the relationship between C++ templates and partial evaluation. In C++, templates were designed to support generic programming, but not deliberately provided the ability to perform compile‐time computations and code generation. These features are completely deliberate, and as a result their syntax is ill at ease. After a review, these features in terms of partial evaluation, a much simpler syntax can be achieved. In C++, it may be regarded as a two‐level language in which types are first‐class values. Template instantiation resembles an offline partial assessor. In this paper, we explain groundwork in the direction of a single mechanism based on Partial Evaluation which unifies generic programming, compile‐time computation and code generation. The language Catat is introduced to demonstrate these ideas.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

This paper describe the relationship between C++ templates and partial evaluation. In C++, templates were designed to support generic programming, but not deliberately provided the ability to perform compile‐time computations and code generation. These features are completely deliberate, and as a result their syntax is ill at ease. After a review, these features in terms of partial evaluation, a much simpler syntax can be achieved. In C++, it may be regarded as a two‐level language in which types are first‐class values. Template instantiation resembles an offline partial assessor. In this paper, we explain groundwork in the direction of a single mechanism based on Partial Evaluation which unifies generic programming, compile‐time computation and code generation. The language Catat is introduced to demonstrate these ideas.

Key concepts: Computer science, Template, Compiler, Partial evaluation, Programming language, Syntax, Compile time, Computation

Related papers

Back to paper searchBrowse research topicsOriginal source
The preliminary investigation of template with C++ — Research Paper | ScholarLens