An Introduction to Metaprogramming

It is impossible that after reading this article we can´t remember the Programming Languages class. That part of the course when we began to learn about metaprogramming also I remember that in the class’ book were pages that have the quote that said that if is not necessary to create a macro don’t do it or in my case don’t try to do it and this was because that topic is difficult to understand, this topic was not an intuitive knowledge, I think that you need to be a high level programmer in order to make this kind of code. This kind of code calls himself a program that generates other programs or program parts, yes, this sound a bit confusing.
So, the professor Ariel Ortiz told us in the Programming Languages class that the people who recommend to don’t use metaprogramming only if it is very necessary are people that don’t know how to create macros and the potential that these tools have and, in the article, we can see reflected that hypothesis of the professor. Even he puts an example of the benefits of the metaprogramming, the example of the girl who was caught texting in class and the professor gave her and special activity of create a program that has and output of 400 times “I can´t chat in class” (or something like that) but with the restriction of not use any kind of loop and the girl instead of write 400 times the same line she used metaprogramming and created a super code that saved the day.

Comentarios

Entradas populares de este blog

Understanding the solid principles

Hidden Figures