by Koromix · 10y ago · 0 comments
This is precisely the kind of thing that leads to unmaintainable "magic" code, even though it can still be useful but with extreme moderation. So I don't see the point of making that a core feature of any language.
If you have any example to the contrary, I'd love a link to a good open-source project that uses these things extensively.
As for not seeing the point of making it a feature of your language, how about Lisp? And I'm not just talking macros. Lambdas, late binding, and in Scheme, the ability to rebind anything lead to a lot of cool tricks and capabilities.
And late binding is extrordinarily important.!
Well I guess it's good at making CRUD web sites. Hardly rocket science.
Tinyclos is a fairly sophisticated implementation of OO and the MOP, written in Scheme.
Its descendants, COOPS, GOOPS, and others, are in most schemes today. Many of them are written in their respective dialect of scheme, with little or no specific compiler support.
SXML allows for writing XML in native scheme syntax.
The anaphoric macros (aif, acond, etc.) are all, well, macros, and thus use metaprogramming principles.
tclOO, [incr tcl], and other OO TCL systems are usually implemented in regular TCL.
Give or take, any large Lisp or Smalltalk codebase takes advantage of dynamic typing, late binding, and some form of metaprogramming.
However, you've made it clear that you hate Ruby, Dynamic Typing, and other such things, as given as much of metaprogramming requires this sort of flexibility, I very much doubt anything I say will convince you that dynamic languages are in any way useful.
All your examples are programming gimmicks, and I've yet to see stuff that solves actual hard problems. I'm not interested in programming for programming's sake. I want to use it to make my computer do useful stuff.