CSC/ECE 517 Spring 2013/ch1b 1k hf: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
mNo edit summary
(first pass at rewriting some of the introductory material)
Line 1: Line 1:
Here is a [https://docs.google.com/a/ncsu.edu/document/d/1aER6f9EDFJaUMgSpK7g5nYPiMNoUjZzwQxzY0jMW8mI/edit link] to the writing assignment for this topic.
*Here is a [https://docs.google.com/a/ncsu.edu/document/d/1aER6f9EDFJaUMgSpK7g5nYPiMNoUjZzwQxzY0jMW8mI/edit link] to the writing assignment for this topic.
*Here is a [[CSC/ECE_517_Fall_2011/ch4_4g_as|link]] to previous work on this topic.


Here is a [[CSC/ECE_517_Fall_2011/ch4_4g_as|link]] to previous work on this topic.
 
== A Basic Definition of Metaprogramming ==
 
The most basic definition of metaprogramming is writing code that writes or manipulates code.
<ref>[http://courses.ncsu.edu/csc517/common/media/08/Metaprogramming/Metaprogramming.html Video Lecture on Metaprogramming by Dr. Gehringer]</ref>
<ref name="wiki metaprogramming">[http://en.wikipedia.org/wiki/Metaprogramming Wikipedia Article on Metaprogramming]</ref>
 
A metaprogram can either manipulate itself, or it can manipulate some other program.
 
:Below are three ''important terms'' associated with a metaprogramming<ref name="wiki metaprogramming">[http://en.wikipedia.org/wiki/Metaprogramming Wikipedia Article on Metaprogramming]</ref>:
::* [http://en.wikipedia.org/wiki/Metalanguage metalanguage] - the language in which a metaprogram is written
::* [http://en.wikipedia.org/wiki/Object_language object language] - the language of the program that is being manipulated by a metaprogram
::* [http://en.wikipedia.org/wiki/Reflection_(computer_science) reflection] - the ability of a programming language to be its own metalanguage (also known as ''reflexivity'')
 
 
== Uses of Metaprogramming ==
 
Metaprogramming can modify the behavior of a program at [http://en.wikipedia.org/wiki/Run_time_(program_lifecycle_phase) runtime]
 
This can allow programmers to write code that is more
consice, reducing the total number of lines of code required.  It can also introduce greater flexibility for compiled languages, without requiring a program to be recompiled.
 
 
== References ==
<references/>

Revision as of 22:25, 18 February 2013

  • Here is a link to the writing assignment for this topic.
  • Here is a link to previous work on this topic.


A Basic Definition of Metaprogramming

The most basic definition of metaprogramming is writing code that writes or manipulates code. <ref>Video Lecture on Metaprogramming by Dr. Gehringer</ref> <ref name="wiki metaprogramming">Wikipedia Article on Metaprogramming</ref>

A metaprogram can either manipulate itself, or it can manipulate some other program.

Below are three important terms associated with a metaprogramming<ref name="wiki metaprogramming">Wikipedia Article on Metaprogramming</ref>:
  • metalanguage - the language in which a metaprogram is written
  • object language - the language of the program that is being manipulated by a metaprogram
  • reflection - the ability of a programming language to be its own metalanguage (also known as reflexivity)


Uses of Metaprogramming

Metaprogramming can modify the behavior of a program at runtime.

This can allow programmers to write code that is more consice, reducing the total number of lines of code required. It can also introduce greater flexibility for compiled languages, without requiring a program to be recompiled.


References

<references/>