3 ms·
It would be interesting to see alternate languages with the ownership model but without the burden of the alien syntax, complex type system, and added complexit
by jillesvangurp 4y ago
It would be interesting to see alternate languages with the ownership model but without the burden of the alien syntax, complex type system, and added complexity of macros. All of which make learning rust a burden. I constantly go like "Wtf does this piece of code even do?" when looking at rust code. And it doesn't help that the libraries and documentation is riddled with type system jargon. I'm sure it's all necessary. But it is not simple.
It might get easier without all that but is that even possible? The concept of borrowing at it's core isn't that hard to grasp: you taking ownership of something means that somebody else doesn't have it until you release it back to them. Easy. But we seem to have a sample of 1 when it comes to rust style ownership. At least, I'm not aware of other languages doing this. It seems to have lots of advantages. Which raises the question why this obviously good idea is not being replicated by others.
- estebank 4y agoIt's been a while since I started learning Rust, and have the advantage of learning new constructs as they are being implemented before they even hit stable, so I find it hard to put myself in your shoes. Could you give some examples of alien syntax whose functionality you couldn't extrapolate from other constructs? rust-analyzer does provide on-hover documentation for keywords and (some) sigils, but it isn't as discoverable as it could be and I can believe that there are documentation "bugs" of missing explanations for specific use-cases, even in The Book!
- hinkley 4y agoThe wisdom for programming language adoption is that you need to be able to do nothing in 3 minutes (exitCode 0 = success), do anything in 10 minutes (pick a softball problem for your tutorials that avoids the difficult parts of your language), and do something in an hour. With that in mind, you don't have to remove the model, you just need defaults that can get you past that 1 hour mark, and people will stick around long enough to put in the time and effort to figuring it out. Most simple problems don't need shared state in order to work, so a language that makes assumptions, such as no sharing by default, could kick that can down the road for a bit. A lot of recursive and some iterative examples only ever accumulate state on the stack. You don't need shared state until you interact with an external system, such as another computer or a human.