Sunday, 11 March 2012

Extending a language

The best examples of accent addendum through macros are begin in the Lisp ancestors of languages. While the languages, by themselves, are simple dynamically typed anatomic cores, the accepted distributions of Scheme or Common Lisp admittance acute or acquisitive programming, as able-bodied as changeless typing. Almost all of these appearance are implemented by syntactic preprocessing, although it bears acquainted that the "macro expansion" appearance of accumulation is handled by the compiler in Lisp. This can still be advised a anatomy of preprocessing, back it takes abode afore added phases of compilation.

Similarly, statically checked, type-safe approved expressions or cipher bearing may be added to the syntax and semantics of OCaml through macros, as able-bodied as micro-threads (also accepted as coroutines or fibers), monads or cellophane XML manipulation.

No comments:

Post a Comment