You should give Julia a shot.
That’s basically that. You can start with super dynamic code in a REPL and gradually hammer it into stricter and hyper efficient code. It doesn’t have a borrow checker, but it’s expressive enough that you can write something similar as a package (see BorrowChecker.jl).
The “proportionality constant” is doing a lot of work in that claim. A lot of “constant” parameters are swept under the rug. If you fix enough stuff that claim is indeed correct, although I agree a bit simplistic
This feels a bit disingenious.
All the languages brought as an example need some sort of handling of the `not found` case. In C++ and Go you need to check against null pointers (or don't but then encounter segafults), Haskell and Rust you are forced to unwrap the value. C also has to check against the error code or incur in errors down the line or worse subtler logic errors.
Missing this types of checks is also source of errors in dynamic languages, adding `1+None` as well as `1+nothing` will return an error if not handled properly.
If you are absolutely sure your element will be in the array you have to encode it, for example
x = something(findindex([1,2,3], val)) # return value is Int now, or an error.
or even
x === nothing && error("oh no")
are enough for the compiler to correctly infer that x will just be an Int, and remove the Union.
Also, the claim that the only way to check for unfavourable Union types is to visually scan each function is just plainly false. There are many tools to do this sort of checks, just to name a few: @code_warntype, Cthulhu, DispatchDoctor
I do agree though that Julia has mainly users from academia, and therefore is less polished on the more pure software engineering aspects and tooling.
But the disclaimer at the end feels just like the author is dismissing the whole language on false premises due to frustration with lack of support/ecosystem for his specific use case.
This is something that I have always strived for, and try to practice every living moment. You put in clearer and more detailed words what I have been trying to develop by myself.
I will be forever grateful for the time I spent practicing martial arts when I was younger. I was lucky enough to find a master that did not teach the practice as a means to reach agonistic goals but instead as practicing mindfulness and self observation. It was never explicitly told or explained in detail how to do it, it was simply practiced over and over again, indirectly, by checking the positions of your body, legs and arms, are they in the correct position? Am I engaging the correct set of muscles? Does the position feel powerful? Is my attention (ki) flowing in the correct direction, in the right spot? Am I aware of my surroundings and perceptive of my practice partner?
We were slowly taught to pay attention, by means of watching ourselves trying to perfect something.
Later in life I realized how much of an impact this had on my ability to concentrate, be present, not only in the physical sphere but also in the mental and spiritual or emotional sphere.
I slowly began to realize that the real practice of the martial art and striving for the perfect form were always a mean to the real goal of instead practicing mindfulness and perseverence.
To me that is the “art” in martial arts. I am not trying to put them on a pedestal, I believe that this “art” is proper of any activity a human can do, that can become art when it is a means to practice this kind of mindfulness.
reply