6 ms·
If all this is Rust with the syntax of go, aw heck that's all I ever wanted anyway.
by webkike 11y ago
If all this is Rust with the syntax of go,
aw heck that's all I ever wanted anyway.
- exacube 11y agowait, you don't like putting your List<> inside your Arc<> inside your Cell<> ?? ;)
- kibwen 11y agoThe whole point of smart pointer types like Arc and Cell is that they give you fine-grained control over the capabilities of your data. If you don't need such fine-grained control, then Rust probably isn't the language you're looking for. :)
- rubiquity 11y agoNobody puts Baby in the Box<>.
- pcwalton 11y agoYou need those for memory safety. It is very true that you don't need Rust's memory safety features, such as Arc and Cell, if you don't want memory safety, but it's also not a very interesting observation.
- cwzwarich 11y agoThere are alternative mechanisms that do not use Cell but still provide safe mutation of pointer-free data. Cyclone had one, and IIRC Rust itself even had one before a type system simplification.
- pcwalton 11y agoSure, and I'd be interested in exploring how those might be integrated into Rust in the future. Carving out subsets of pointer-free data seems pretty powerful. (It doesn't seem like the language in the OP is interested in memory safety though.)
- kibwen 11y agoAlthough some bits of syntax are reminiscent of Rust, semantically it's not Rust in the slightest: "Ark is not a garbage collected language, therefore when you allocate memory, you must free it after you are no longer using it. We felt that, as unsafe as it is to rely on the user to manage the memory being allocated, performance takes a higher precedence. Although garbage collection makes things fool-proof and removes a significant amount of workload from the user, it inhibits the performance we were going for." https://github.com/ark-lang/ark-docs/blob/master/REFERENCE.md#managing-memory https://github.com/ark-lang/ark-docs/blob/master/REFERENCE.m... This is the usual false dichotomy that languages subscribe to, where they presume that manual and unsafe memory management is the only alternative to dynamic and safe memory management. But Rust's secret sauce is that memory management is static and safe, thanks to linear types and the borrow checker. Rust is still the only competitor in the space of zero-overhead memory-safe languages.
- donuteaters 11y agoI really wish Rust was as great as you advocates say, but that has not been my experience. For background: I've been following it for a while now. About a year or so ago, I dove it into with enthusiasm, but I got bit when the sigils went away, and so I backed off until the 1.0 release. After the 1.0 release, I figured it was ready so I spent another couple of weeks learning the new way of things and really hoping that it would be my replacement for C and C++. I really wanted Rust to be great. Unfortunately, it has lots of warts that have sent me crawling back to C++. Addressing the particular item you're talking about here, manually specifying lifetimes of objects is a cure that's worse than the disease. It's great when the compiler infers everything for you, but I'm never going to be able to explain the syntax or semantics of those ugly 'a marks to my coworkers who aren't interested in programming language theory. Anyways, I've been tempted to write a full blog post listing all of my Rust complaints, but I figured it's better to just quietly let you guys enjoy your thing. However, whenever I see these advocacy posts from you and the other Rust honchos, I can't help but scream a little bit inside. It's really not as good as it could've been. To be really specific: it's great that you got "zero-overhead memory-safety", but I can't even implement fundamental data structures without using unsafe blocks and lifetime annotations.
- pcwalton 11y agoIt doesn't look like it's memory safe.
- felixangell 11y agoUnlike Rust, this is something we aren't focusing on. I just really like Rust, so we borrowed a lot of the syntax.
- pcwalton 11y agoYup, and that's a totally legitimate decision IMHO. Best of luck with your project :)