CSC/ECE 517 Fall 2010/ch2 S24 rm: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
"I'd rather write programs that write programs than write programs" - Richard Sites
''"I'd rather write programs that write programs than write programs" - Richard Sites''
 
__TOC__
 
 
= Introduction =
 
Most metaprogramming is done in dynamic languages, like Ruby.  Achieving metaprogramming in static languages directly, becomes complex due to its inherent nature of compile time abstraction verification. However, there are tools and packages for support of metaprogramming in statically typed languages, such as Java that can be leveraged to achieve metaprogramming features. 
 
 
== Metaprogramming ==
 
Metaprogramming is a programming technique of writing computer programs that write or manipulate other programs or themselves. In other words, it is a programming technique of writing programs with a higher level of abstraction to make it appear as generative programming. 
 
Metaprogramming involves two kinds of languages. The meta-language is the language in which meta-programs, which construct or manipulate other programs, are written. The object-language is the language of programs being manipulated. This makes them ‘meta level programs’ whose problem domain are other ‘base level programs’.[1]
 
[[Image:Example.jpg]]

Revision as of 15:35, 22 September 2010

"I'd rather write programs that write programs than write programs" - Richard Sites


Introduction

Most metaprogramming is done in dynamic languages, like Ruby. Achieving metaprogramming in static languages directly, becomes complex due to its inherent nature of compile time abstraction verification. However, there are tools and packages for support of metaprogramming in statically typed languages, such as Java that can be leveraged to achieve metaprogramming features.


Metaprogramming

Metaprogramming is a programming technique of writing computer programs that write or manipulate other programs or themselves. In other words, it is a programming technique of writing programs with a higher level of abstraction to make it appear as generative programming.

Metaprogramming involves two kinds of languages. The meta-language is the language in which meta-programs, which construct or manipulate other programs, are written. The object-language is the language of programs being manipulated. This makes them ‘meta level programs’ whose problem domain are other ‘base level programs’.[1]