I recently became interested in the idea of writing decorators in R, as the title of this blog post may suggest. A decorator is a function that takes another function as input, and extends the behavior in some manner. A use-case is when you find yourself writing several functions, and each shares some small aspect of functionality or code. A reasonable example is as follows.
Consider the case where you are writing several functions in R, each of which takes some non-trivial amount of time to compute.
I’ve been fairly interested in the Julia programming language recently. Haven’t heard of it? From the project website: “Julia is a high-level, high-performance dynamic programming language for technical computing.”
From what I understand, it’s a programming language intended to provide a high-level programming interface with similar features to R / Python / Matlab at near C-level speed. Sounds pretty intriguing right? The language is fairly new, so its ecosystem is not as mature as R’s or Python’s.