DeVault: Announcing the Hare programming language
DeVault: Announcing the Hare programming language
Posted May 2, 2022 8:45 UTC (Mon) by FSMaxB (subscriber, #106415)Parent article: DeVault: Announcing the Hare programming language
I also think that having manual memory management is a big mistake that will lead to some (although definitely not all) of the mistakes from the C world that so regularly provide us with exploitable vulnerabilities. There are things with which a programmer just shouldn't be trusted, given their track record of screwing it up.
I applaud the effort in significantly cutting down on the amount of undefined behavior and in the enormous ergonomics improvements over C though, not least the error handling improvements.
I guess I have to out myself as one of the "rust fanboys", but all that means is that I follow a set of principles that rust happens to cater to best at the moment (in the realm of systems programming). Some of those are:
* Don't trust the programmer, humans make mistakes, so let's help prevent them. (note that this will always need an escape hatch like "unsafe" because no system can be perfect in preventing all mistakes but also allowing all "good" behavior [without going into a definition of "good" here])
* Provide the programmer with powerful tools to constrain themselves even further from doing incorrect things (that would usually mean a quite advanced type system)
* Be ergonomic to use, not just the language, but the tooling around it as well (build system, dependency management, library documentation etc.)
* Work on the most commonly used platforms with the possibility of supporting even more.
Rust is definitely far from perfect some of my issues that I bump into regularly:
* Compile times are horrendously slow when compared to Go for example (haven't tried that out with hare yet, but probably similarly fast?). That definitely is a hindrance and reduces the speed in which you can iterate when developing. Slower iterations mean less productivity (although some of the other features make more than up for the loss in productivity IMO, but that doesn't mean faster wouldn't be even better).
* Rust is eating resources like crazy. Notably CPU time and disk space (some of those target directories on my machine have grown to >100GiB at times if not regularly cleaned)
* What's up with these abbreviations, like e.g. "fmt" and "std". Typing a standard libraries main scope into a search engine shouldn't get you results about "sexually transmitted diseases" and what's up with "Vec"? C++ already admitted that "vector" was the wrong name for a dynamically sized array, rust not only copies that but then abbreviates it on top. Also "fn" and "str" and "recv" and "ctx" etc.
Btw. I really like hare's bootstrapping capabilities, but I still think that the importance of bootstrapping is a bit overstated. In this day and age, we usually use cross-compilation to get code running on new targets. That's even true for C. Ever bootstrapped C on a new platform by writing an assembler in machine code, then using Assembly to write a more expressive language, use that language to write an even more expressive language and so forth until you have implemented something for which a C Compiler exists? That's just not the way things are done in this day and age, except maybe for fun and education purposes. If it's ok for C to target new platforms not by being bootstrapped but by being cross-compiled, why should the expectation for a systems programming language competing with it be different? And that comes from someone having bootstrapped OpenJDK 8 from GCJ on PowerPC 32 in a 2 week effort a few years back on Gentoo, so I know at least somewhat what I'm talking about. I REALLLY wouldn't want to bootstrap rust from C on PowerPC 32, that won't be done in 2 weeks, of that I'm sure. Instead I would install a binary rust toolchain that has been cross-compiled and then go from there.
