Metaprogramming: Difference between revisions

m
no edit summary
mNo edit summary
Line 186:
For examples in real world, look [http://svn.gna.org/viewcvs/freeciv/trunk/common/city.h?view=markup FreeCiv], and [http://mz.openttdcoop.org/is2/openttd-is2-h1f270887-docs/engine__base_8h-source.html OpenTTD] macros(city_map_iterate for FreeCiv, FOR_ALL_ENGINES for OpenTTD).
 
Also, C does not support functions overloading, but becausbecause macro calls do not require type it's possible to emulate overloading to some extent
 
<lang c>
Line 195:
 
The [[Order|Order programming language]] is implemented entirely using the C preprocessor, providing a portable, high-level, functional programming language that can be used to metaprogram any C99 project, in a fashion loosely similar to Lisp's macro system.
 
[https://github.com/Hirrolot/metalang99 Metalang99] is also a functional language aimed at full-blown preprocessor metaprogramming in pure C99. With the aid of Metalang99, such things as [https://github.com/Hirrolot/datatype99 Datatype99] and [https://github.com/Hirrolot/interface99 Interface99] became possible.
 
=={{header|C sharp|C#}}==
Anonymous user