Thoughts

mental health break ,./'"**^^$_---
One of the things I tried to do with Thu was type-check at run time. The most interesting things about Julia is that it actually does this.
Type-checking at run-time is this thing that sounds really random and totally useless. In most compiled languages, the types are used to compile and then thrown away. Shouldn't there be a way to get benefit from types at runtime? This is one of the things that I noticed, and that frustrates me about OO languages. (A more detailed description of this problem can be found in the [Thu design document](https://ourjseditor.com/program/S5ShEy), under "Problem 2".) It was very cool to see Julia identify the same issue that I had identified. I watched, in particular, [this](https://www.youtube.com/watch?v=kc9HwsxE1OY) video (which unfortunately assumes knowledge of Julia). The solution that Julia implements is called Multiple Dispatch, and it's not specific to Julia. Multi-dispatch is similar to function overloading, except that instead of doing Java-style logic to decide the type of an object, the type is determined, and matched against, at run-time. It was also very cool to be able to compare my solution to that of multiple dispatch and Julia. I really like OOP, it's something that is relatively intuitive (as far as programming concepts go), and something that I've been using for a while. So Thu was definitely designed around OOP paradigms. While this has the obvious advantage of allowing you to write object oriented code, it means that the language probably wouldn't be able to take advantage of the looser type system. People would just end up writing OO code in Thu. Julia doesn't try to allow OO code. It seems to take after a functional language much more. Using functions instead of methods is what allows multiple dispatch to be powerful. You can write functions that match on the object type instead of defining those functions as a method of that object. So instead of `Integer.add()` and `Float.add()` you just call `add` and it does the right thing, switching behavior to handle different types correctly. In this way, multiple dispatch allows for code re-use. Lastly, I want to point out that I have never written so much as a line of Julia. This is purely a ~~academic~~ recreational exploration.
Link 7:12 p.m. Nov 20, 2020 UTC-5