Most voted "metaprogramming" questions
Metaprogramming is programs that create other programs. It’s also about several cases where you use a program (or excerpt from a program) to manipulate another program - turn it into something other than what it would be if it were interpreted as the programmer wrote it.
Learn more…9 questions
Sort by count of
-
19
votes1
answer739
viewsWhat is the difference between "Generics" (Java/C#) and "template" (C++)
In the question What are the differences between Generic Types in C# and Java? the difference between the Generics between Java and C#. We know that C++ does not have Generics, but uses templates…
-
13
votes2
answers3635
viewsWhat is metaprogramming?
Sometimes we hear about "Metaprogramming". What is? What good is? How and when to use?
-
3
votes1
answer379
viewsWhat is the difference between metaprogramming and reflection?
There are two terms that look a lot like when we are talking about introspection techniques: metaprogramming and reflection. Wikipedia treats reflection as a key strategy of metaprogramming…
-
1
votes1
answer65
viewsIs it possible to assign loop repetition to a variable?
I am implementing a code where if the received variable does not contain a value, a for, otherwise, no. Well, if it were for the "simple" case, it would just implement the if with the conditions and…
-
1
votes2
answers80
viewsHow to manually delegate an object to Ruby
To better understand the meta-programming in Ruby I would like to make an object, when instantiated, delegate all methods of an object passed as parameter. And your class will pass to delegate the…
-
1
votes1
answer345
viewsMetaprogramming with ruby, methods with SELF
good evening... I come from other languages somewhat different to Ruby, such as C/C++ , JAVA... And I got a little lost trying to understand the difference between the following methods: Class teste…
-
1
votes1
answer2316
viewsHow to display the image saved in the database in my html code
I have a mysql database created in phpmyadmin, already saved the path of the pictures there, also in an image table with id and name(img), now I would like to know how to display these images in the…
-
0
votes1
answer76
viewsMetaprogramming with ruby on Rails in a partial
I am working on a Ruby on Rails project and I am working on a module (Financial) it is linked to several models, and depending on the screen that the user is he can bring a screen with all the…
-
0
votes0
answers55
viewsHow to get a variable name?
Is there any way to get the name of a variable using metaprogramming (or reflection, I believe) in Ruby? I want something like nameof of the C#. I was looking for something like: minha_variavel =…