JavaScript and Lisp have eval
. Eval permits us to create code. Nevertheless, it suffers from lack of an important elements, the power to have code that maintains code. To permit for such constructs, it is advisable to go down the “meta programming rabbit gap”. Warning, this gap may be very deep, and extremely complicated. As well as our puny software program growth brains, would not even have the psychological framework to grasp its capabilities, due to an excessive amount of OOP.
Think about you having a operate just like eval
, besides as an alternative of simply doing string concatenation, it semantically inspects your code, permitting your eval2
operate to alter present code. What may that do for you?
I simply had a help request from one of many half a dozen of software program growth groups I’m serving to out, everywhere in the world. This one originated from our Kyiv companion, needing to alter the authorisation mechanism of his endpoints. I advised him he needed to exchange the invocations to auth.ticket.confirm
, nevertheless it was too many recordsdata for him, so he wished to alter the operate itself – Which after all is a no go for code already in manufacturing.
I advised he ought to use the meta programming capabilities of Hyperlambda to create a snippet of code that modifies his present code. Partially to clarify to him how this course of works, and partially as a result of I’m actually in love with meta programming, and wish to share my love with the world – I made a decision to create a YouTube video the place I exhibit the idea.
Let me know what you assume within the feedback. Nevertheless, principally, the above permits me to do in 0.1 second, what a human being would have wanted in principle a number of days to perform. That is …
The coolness of Meta Programming ^_^