Skip to main content.

Monday, August 25, 2008

I've been able to stuff in late bindings in a few hours, and they are pretty powerful things.
More details.

Other than the fifth paradigm, the tabular programming, this was the "big thing" in 0.8.12. Actually, I hoped for less, in the sense that I was just aiming for a syntactic construct by which it would have been possible to declare variables in the scope of functional evaluations, but I achieved more, as late bindings are full items and can be generated everywhere, stored and re-stored in functional and OOP code in a extremely flexible way, or even created dynamically on the fly.

The functional constructs are now self-sustained, and offer a level of interaction that is only a dream in every other functional language I know of. The ability to build functional code on the fly directly within the language is kinda a new thing. Something similar was available in Prolog, as it was somewhat possible to modify the structure of the program at runtime, up to a certain degree. Also, modern scripting languages (including Falcon) give the ability to compile arbitrary code from within the script and use it on the fly, but this ability to write arbitrary functional code is by far more efficient and elegant.

And the most funny thing is that I was able to make it in a fraction of the expected time (so much that I took the occasion to add a couple of functional constructs and polish some more). This time I sat down, think coldly at the problem and didn't put my hands on that until having a complete clear picture and figuring in mind a conceptual entity capable of managing the type of code I had in mind, and possibly more. It seems that loosing two weeks in reworking the lexer for FTD and then discovering a 2 hours method to do it (and better) was a lesson learned. I am happy.

Late binding usage is currently limited to functional evaluations and cached calls (array calls), but it can be easily used in future for even more interesting usage.

Comments

No comments yet

Add Comment

This item is closed, it's not possible to add new comments to it or to vote on it