4 ms·
Metaprogramming and repls are still pretty common, just not as much for static languages (Haskell being a notable exception, statically compiled but ships with
by habitue 3y ago
Metaprogramming and repls are still pretty common, just not as much for static languages (Haskell being a notable exception, statically compiled but ships with a repl)
Python, Ruby and C++ are famous for having rampant metaprogramming, rust has macros, Java and Go have annotations that guide codegen, etc etc
- Vecr 3y agoI remember when Rust had a REPL, was that through MIRI? I can't really remember. Has anyone made something similar recently?
- habitue 3y agoRust does indeed have several repls (off the top of my head there's one called "evcxr", which I actually interviewed the author of[0]) But rust doesn't ship with a repl. There are repls probably for every language somewhere, even Java or C. [0]: https://blog.abor.dev/p/evcxr https://blog.abor.dev/p/evcxr
- eternityforest 3y agoMetaprogramming is wonderful if you need it, but it's so easy to make a real mess. My experience has been that whenever I create new abstractions beyond just writing a class or a function, everyone asks why I didn't just do some much easier hard coded solution. I then maintain the metaprogramming based solution for a while on my own because nobody else wants to touch it. Then I get tired of it, rip it out however I can, and realize they were right all along... I try not to do that cycle outside of toy projects!