2 ms·
How much metaprogramming is normally going on behind the scenes in a typical Ruby/Rails app vs Java or C# though? If you do a lot of reflection in Java then yo
by InclinedPlane 13y ago
How much metaprogramming is normally going on behind the scenes in a typical Ruby/Rails app vs Java or C# though?
If you do a lot of reflection in Java then you'll end up with some pretty crummy performance, but the average Java program doesn't have much.
- philwelch 13y agoIt's not just the actual metaprogramming, i.e. define_method is slow. It's also the runtime implications of metaprogramming being possible, i.e. needing to dispatch each and every method call dynamically just in case someone called define_method. Java can turn every method call into a function pointer at compile time.