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
Abstract
Shruti Sandal, Raghuraj Singh, Abdul Jabbar Khilji, Shashi Shekhar Ranga, Sanjay Tejasvee, Devendra Gahlot, R. B. Patel, Bhupendra Singh
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.
A significance statement is not available in the OpenAlex record.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
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