News for hackers. Stuff that matters.
Re:The Hare programming language by zozbot234 on Monday April 25, 2022 @05:35AM (#31152258)
> C++ definitely isn't it, and while Rust does bring significant advances in this field, it's a very large and complicated language.

It really isn't. Not compared to C++, at least. Or to managed language runtimes, which are just as "large and complicated", only beneath the hood.

Re:The Hare programming language by discreteevent on Monday April 25, 2022 @05:48AM (#31152366)
Putting things "below the hood" with as few leaks as possible is one of the key ways of managing complexity. So if a language can do this for a certain set of use cases then it's worth using for those use cases. Everything becomes quicker and more productive. There's a reason people that few people nowadays write the server side of web applications in C++. Rust isn't a huge improvement for that use case compared to a managed language.
Re:The Hare programming language by IshKebab on Monday April 25, 2022 @11:23AM (#31156161)
Rust is definitely as complicated as C++. However its complexity isn't as big of a deal because it's so much safer. If you forget one of the extremely complicated Rust rules you'll get a compile error. If you forget one of the extremely complicated C++ rules you hopefully will get a compile error. Maybe a warning with `-Wall` or maybe you'll silently get memory errors at runtime!
Re:The Hare programming language by woodruffw on Monday April 25, 2022 @01:45PM (#31158272)
Rust is a complicated language, but I don’t it reaches C++ levels of complexity. One of the pernicious aspects of “mastering” C++ is understanding all of its leaky abstractions; there’s nothing like SIOF or SFINAE in Rust.
Re:The Hare programming language by IshKebab on Monday April 25, 2022 @05:04PM (#31160575)
It definitely does. I think a lot of people think it doesn't because a) most people who know both have far more experience with C++ and are yet to experience its really complicated bits yet, and b) C++ has an actual specification so you can read about all its complexity.

Rust may not have SFINAE but C++ doesn't have for<'a>, Phantom data or Pin.

Re:The Hare programming language by woodruffw on Monday April 25, 2022 @06:52PM (#31161857)
> Rust may not have SFINAE but C++ doesn't have for<'a>, Phantom data or Pin.

I'll grant you PhantomData, but I'd argue with the other two. C++ does have lifetimes and pinning semantics, they're just implicit and (largely) taken for granted. That is, until you cause memory unsafety with either.

IMO, the overall pattern between C++ and Rust is that "advanced" use requires many of the same skills between the two, but that (1) Rust is much better about avoiding "advanced" use, and (2) Rust forces the user to be much more explicit about what they actually mean (cf. lifetimes and pinning). These are arguably more complex than what C++ does, but only in the sense that C++ amortizes that complexity in blood.

Re:The Hare programming language by afdbcreid on Thursday April 28, 2022 @04:14PM (#31197647)
> C++ does have lifetimes and pinning semantics, they're just implicit and (largely) taken for granted.

C++ does have pinning, but it is much rarer than in Rust because of user-defined move constructors.

Re:The Hare programming language by turminal on Monday April 25, 2022 @05:37AM (#31152271)
It's certainly much more complicated than Go, and not just on the surface
Re:The Hare programming language by kaba0 on Monday April 25, 2022 @07:38AM (#31153122)
But they are nowhere near the same niche. Go is much much closer to JS than to Rust by design, it just mimics being lower-level.

System level programming almost by definition requires quite a bit of complexity, and you can’t hide it no matter how elegant your abstraction is. Essential complexity is non-reduceable:

Re:The Hare programming language by pjmlp on Tuesday April 26, 2022 @05:59AM (#31165627)
I would assert that writing compilers, linkers, hypervisors, unikernels, GPU debuggers, cloud infrastructure, is system level programming.
Re:The Hare programming language by zelphirkalt on Monday April 25, 2022 @06:03AM (#31152476)
Well, that's because Go, as per design, is quite limited. Its type system is lacking things Rust has. The languages have (had?) different goals. You can see one past example in generics. How long it took to finally drag the Go developers to implement them, coming to recognize their usefulness, instead of sticking to the rather limiting "No we want the language to be very simple so that everyone can understand and use it." attitude. Rust has been designed with that safety aspect as one of its primary goals and that will incur some cost in being less simple.