| ▲ | pron a day ago | |
> Simplicity is a good metric but a lousy goal. If simplicity was a good goal, Brainfuck dialect would be the most used language. No, because simplicity is not the only goal. > True to an extent but there are universal qualities every good language shares. Yes, there are some, but none of them are relevant here. > Ease of use; good performance even in naive cases; good safety/security even in naive cases; expressivity; fast compile times; conciseness. Obviously, conciseness is not some ultimate goal, but a tradeoff, often one that contrasts with readability/understandability. APL is probably the language most famous for its conciseness, but it was never very popular. The same goes for some of the others: these are all good things but come with the caveat of "all else being equal", i.e. if two languages were identical in every respect but one was clearly better on one of these fronts it could be universally recognised as superior. This rarely happens, and usually to gain more points in some areas a language has to sacrifice others. Even safety is not as simple as it may seem. I've worked in formal methods and on safety-critical software, correctness is very important to me, and safety serves correctness. As you may know, while both safe Rust and safe Zig offer spatial memory safety, unlike Rust, Zig doesn't offer temporal memory safety. You'd think that someone who cares so much about correctness would always prefer more safety, but again we run into the problem of "... all things being equal," and that's not the case here. For one, to achieve its temporal memory safety, Rust sacrifices simplicity and explicitness, which are also important for correctness in some important situations (while Zig compensates not only in simplicity and explicitness, but also in other ways). For another, Rust makes you give up much of its safety precisely when you reach for a low-level language, which is when you want precise control. So the point is that things aren't so black-and-white (even Rust accepts that; e.g. there are languages safer than Rust, some existed before it was invented). Anyway, you will simply need to accept that even among the best and most experienced language designers in the world and even among the best and most experienced programmers in the world, there's often a lack of consensus, and in this particular case, some prefer Zig to Rust and some vice versa. They're both decent, they're both interesting, they're different from each other and make different choices when there's no universal superiority, and they're both liked by some and disliked by others. | ||