I believe that Julia possesses certain advantageous features that R and Python have yet to adopt. Some of these attributes might prove to be quite challenging to implement, while others could even be considered impossible. Imagine the scenario where you create a new data type. With this type in place, it becomes possible to implement comprehensive mathematical operations. Consequently, vectors and matrices of this type work seamlessly. Even the computation of a matrix’s inverse—given that the element type is a custom structure—can be achieved, provided you implement the necessary operators through multiple dispatch.
Here is a sample work of an entire math implemented on a user-defined struct. All of the methods work as they work using Float64’s: https://github.com/jbytecode/JMcDM/blob/main/src/greynumber.jl
Let me to give another specific example. Imagine you need to conduct k-medoids clustering for a dataset containing 100,000 samples. The R implementation necessitates a pre-calculated distance matrix, which is impossible to accommodate on a standard home computer (in fact, the R implementation is capped at 65,535 samples). However, in Julia, you have the option to create an OnDemandDistanceMatrix, a subtype of AbstractMatrix. This allows you to calculate the required distances on-demand, enabling you to utilize Clustering.jl’s kmedoids function. Although it does come at the cost of increased calculation time, it renders the task achievable. At the end, it is now possible.
During one of my university lectures, I delve into subjects like SQL, R, Python, and Julia. I consistently highlight the unique features of Julia and encourage my students to independently recognize the differences. Through some guidance, they come to realize the opportunities that Julia offers, often making a pleasantly surprising choice.
I know that I’ve alluded to multiple dispatch in various ways. However, are users of R and Python truly familiar with these features? Simply stating that ‘multiple dispatch is exceptionally beneficial’ might not resonate with them. Are they conscious of the fact that their operator overloading mechanisms don’t apply to matrix inversions?
In certain scenarios, Python takes the lead. It’s appropriate to let it take the forefront in those domains. Similarly, the current situation applies to R; it has a legacy and is renowned in specific fields. However, what about Julia? What unique capabilities does Julia offer that cannot be replicated using other tools? By showcasing the areas where we bridge the gap, we create more room for newcomers to make their mark.
And yes, all of the aforementioned aspects pertain to the unique language design of Julia, not the packages.