CSC/ECE 517 Fall 2010/ch4 4g HW: Difference between revisions
Line 6: | Line 6: | ||
Drawing from the concepts discussed in Chapter 2 Section 24, [[CSC/ECE 517 Fall 2010/ch2 S24 NS|Metaprogramming in Statically Typed Languages]], we will continue to examine metaprogramming concepts in the environment of dynamically typed languages. As always, the focus will be on object-oriented languages to demonstrate the common usages of metaprogramming. | Drawing from the concepts discussed in Chapter 2 Section 24, [[CSC/ECE 517 Fall 2010/ch2 S24 NS|Metaprogramming in Statically Typed Languages]], we will continue to examine metaprogramming concepts in the environment of dynamically typed languages. As always, the focus will be on object-oriented languages to demonstrate the common usages of metaprogramming. | ||
As you may recall from the previous chapter, metaprogramming can be defined as "the technique that allows us to write programs that can manipulate other programs or themselves as a part of their data" [[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch2_S24_NS]]. Thus it allows us to add behavior to classes or objects that was not previously specified, often done at compile time instead of runtime. The same basic concepts still apply here, although in a few different fashions for dynamically typed languages instead of those that are statically typed. | As you may recall from the previous chapter, metaprogramming can be defined as "the technique that allows us to write programs that can manipulate other programs or themselves as a part of their data" [[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch2_S24_NS#What_is_Metaprogramming.3F]]. Thus it allows us to add behavior to classes or objects that was not previously specified, often done at compile time instead of runtime. The same basic concepts still apply here, although in a few different fashions for dynamically typed languages instead of those that are statically typed. | ||
This chapter will begin with a brief overview of object-oriented dynamic programming languages, or languages with an object-oriented bent, and progress into a further analysis of dynamic typing within those dynamic languages. The majority of the chapter will then cover metaprogramming within the previous described environment, offering examples, common methods of use, and existence in real-world software projects. Examples will be given to illustrate important concepts, and will be expressed in sample object-oriented dynamically typed languages. | This chapter will begin with a brief overview of object-oriented dynamic programming languages, or languages with an object-oriented bent, and progress into a further analysis of dynamic typing within those dynamic languages. The majority of the chapter will then cover metaprogramming within the previous described environment, offering examples, common methods of use, and existence in real-world software projects. Examples will be given to illustrate important concepts, and will be expressed in sample object-oriented dynamically typed languages. |
Revision as of 19:08, 18 October 2010
Introduction
Drawing from the concepts discussed in Chapter 2 Section 24, Metaprogramming in Statically Typed Languages, we will continue to examine metaprogramming concepts in the environment of dynamically typed languages. As always, the focus will be on object-oriented languages to demonstrate the common usages of metaprogramming.
As you may recall from the previous chapter, metaprogramming can be defined as "the technique that allows us to write programs that can manipulate other programs or themselves as a part of their data" [[1]]. Thus it allows us to add behavior to classes or objects that was not previously specified, often done at compile time instead of runtime. The same basic concepts still apply here, although in a few different fashions for dynamically typed languages instead of those that are statically typed.
This chapter will begin with a brief overview of object-oriented dynamic programming languages, or languages with an object-oriented bent, and progress into a further analysis of dynamic typing within those dynamic languages. The majority of the chapter will then cover metaprogramming within the previous described environment, offering examples, common methods of use, and existence in real-world software projects. Examples will be given to illustrate important concepts, and will be expressed in sample object-oriented dynamically typed languages.
Dynamic Languages
[[2]]
Definition
Dynamic languages (with dynamic typing):
Pure oo: Ruby
Not pure oo but designed mainly for that purpose: Python
Not oo but has elements: Perl
Dynamic Typing
[[3]]
Definition.
How different from static.
Examples of:
Ruby
Python
Perl
Examples
Metaprogramming
Definition.
How the implementation is similar to or different from static.
Common Usage
Examples
Ruby
Python
Perl
Impact and Development
Real-world examples.
Proposed improvements in the given language-examples.
Conclusion
Review everything.