3 ms·
You can have metaprogramming, but it's not the same level by any means. Take Perl, for example. You can't have robust metaprogramming on a language with an und
by chimeracoder 14y ago
You can have metaprogramming, but it's not the same level by any means.
Take Perl, for example. You can't have robust metaprogramming on a language with an undecidable grammar. Read through the above link and you'll see the difference.
- chromatic 14y agoIf you define "metaprogramming" as "homoiconic code generation" or "hygenic macros" or "the language I use to manipulate the AST is the same language as the AST", sure. I'm sure that's not the only thing people mean when they say "metaprogramming" though.
- draegtun 14y ago> You can have metaprogramming, but it's not the same level by any means. In the languages I've mentioned it is as the same level. Here are some examples - http://news.ycombinator.com/item?id=3125375 http://news.ycombinator.com/item?id=3125375 > Take Perl, for example. You can't have robust metaprogramming on a language with an undecidable grammar I'm referring to Perl6 here which is (intended to be) self hosted via perl6 grammars & also comes with hygienic macros: - http://en.wikipedia.org/wiki/Perl_6_rules#Grammars http://en.wikipedia.org/wiki/Perl_6_rules#Grammars - http://en.wikipedia.org/wiki/Perl_6#Macros http://en.wikipedia.org/wiki/Perl_6#Macros While perl5 won't get this good you'll be surprised what metaprogramming can be done with it. NB. For an example of macro-like things here is a list of CPAN modules that make use of Devel::Declare - https://metacpan.org/requires/distribution/Devel-Declare?sort=[[2,1] https://metacpan.org/requires/distribution/Devel-Declare?sor...] > Read through the above link and you'll see the difference. I have and I remember reading it back in 2005 :) This doesn't affect the list of languages I mentioned earlier.