Earlier quoted context omitted.
Where did you learn CS that they didn't have lots of cyclic data structures? We had those even in our intro class at Berkeley...
I a few universities I know, including my own, cyclic data structures are on the curriculum, but nowhere near being taught as basic or intro stuff. That would lists, queues, trees, and hash-maps.
Why I’m dropping Rust
151–160 of 164 posts
Re: Why I’m dropping Rust
#152Earlier quoted context omitted.
In what conceivable way? Safe Rust allows one to do an incredible amount of things whole providing strong guarantees against the sorts of problems that plague lower level languages. Since this isn't suitable for absolutely everything, we have unsafe Rust to fill in the gaps in the small areas it's needed. Unsafe Rust isn't "bad", it just doesn't provide the same guarantees as safe Rust. And if something goes wrong, y…
And if something goes wrong, you can at least narrow down your search to unsafe areas of the code. No. That's only true if the unsafe code presents a completely safe interface to its callers. If the safe code opens a hole in Rust's protection system, which is very easy to do, you can now have C-type no-idea-where-it-is bugs.
Re: Why I’m dropping Rust
#153Earlier quoted context omitted.
You don't need weak references. Just use strong ones.
Then you have an ownership loop.
Re: Why I’m dropping Rust
#154Earlier quoted context omitted.
Where did you learn CS that they didn't have lots of cyclic data structures? We had those even in our intro class at Berkeley...
It occurs to me that these courses have been teaching what might (should?) be considered a naive view of memory; you show me a traditional cyclic data structure and I'll show you a concurrency bug. I suppose that's fine in 1978 when no one imagined they'd be dealing with multi-core micro controllers, but today, when you find yourself using a "systems" language for non-toy work and you reach for a tool as sharp as a r…
Re: Why I’m dropping Rust
#155Earlier quoted context omitted.
vpri.org managed to squeeze a GUI toolkit and a document format and the whole compiler toolchain required for the language (including rasterization) in about 20K lines of code, and it's fast enough to run in a laptop. I'm pretty sure we haven't explored the sheer depth of simplifications that can still be done.
Sounds cool. Got a link? I can't find anything on their website that seems to be that sort of thing?
Re: Why I’m dropping Rust
#156Earlier quoted context omitted.
Where did you learn CS that they didn't have lots of cyclic data structures? We had those even in our intro class at Berkeley...
It occurs to me that these courses have been teaching what might (should?) be considered a naive view of memory; you show me a traditional cyclic data structure and I'll show you a concurrency bug. I suppose that's fine in 1978 when no one imagined they'd be dealing with multi-core micro controllers, but today, when you find yourself using a "systems" language for non-toy work and you reach for a tool as sharp as a r…
Re: Why I’m dropping Rust
#157Earlier quoted context omitted.
Sounds cool. Got a link? I can't find anything on their website that seems to be that sort of thing?
I doubt that you'll find much.. They didn't release the code of their "crown jevel" (Frank, the 'word processor'), which makes me quite unimpressed about these year of research where the main result is a bunch of papers and demos but (nearly no) code (except for the OMeta part).
Their writing is here: http://vpri.org/html/writings.php
Their various reports are there (most recent first):
http://www.vpri.org/pdf/tr2012001_steps.pdf
http://www.vpri.org/pdf/tr2011004_steps11.pdf
http://www.vpri.org/pdf/tr2010004_steps10.pdf
http://www.vpri.org/pdf/tr2009016_steps09.pdf
Re: Why I’m dropping Rust
#158Earlier quoted context omitted.
In what conceivable way? Safe Rust allows one to do an incredible amount of things whole providing strong guarantees against the sorts of problems that plague lower level languages. Since this isn't suitable for absolutely everything, we have unsafe Rust to fill in the gaps in the small areas it's needed. Unsafe Rust isn't "bad", it just doesn't provide the same guarantees as safe Rust. And if something goes wrong, y…
All languages have design flaws. Thats why people keep making new languages. Arguing that Rust does not have design flaws is going to arouse more skepticism then anything else. It is not mandated that you 'must' write safe code but that you 'can' write safe code. So there really is no fundamental assurance that rust and its libraries are in fact 'safe' by Rusts own definition in any meaningful sense. You could make t…
That said, people also need to understand that many such instances are not design flaw, but are instead design tradeoffs. The OP indicated that having to switch to unsafe Rust to represent a cyclic datastructure is a design flaw. My response is that it's a tradeoff that pays dividends in every other piece of code.
Can Rust improve upon the number of problems that can be solved with safe vs. unsafe Rust? Absolutely! Is it worth cordoning off a few cases that don't technically need unsafe behavior, to ensure all other Rust code performs safely? Emphatically yes.
Re: Why I’m dropping Rust
#159Earlier quoted context omitted.
In what conceivable way? Safe Rust allows one to do an incredible amount of things whole providing strong guarantees against the sorts of problems that plague lower level languages. Since this isn't suitable for absolutely everything, we have unsafe Rust to fill in the gaps in the small areas it's needed. Unsafe Rust isn't "bad", it just doesn't provide the same guarantees as safe Rust. And if something goes wrong, y…
I'm not convinced that cyclic data structures are a feature that's exotic enough to warrant breaking the language contracts. This thread alone shows that it's a common occurrence in tree structures. There will be likely be other structures as well. So I'd think a better way than saying "don't do that - or if you have to, you're on your own" would be to analyze use cases and see which scenarios the language can satisf…
For real, honest-to-god, cyclic data structures — just use unsafe Rust. Again, unsafe Rust isn't "bad". It's just unsafe. More care will be expected of the code to ensure that it exports a safe interface, but nothing in the language stops you from doing it. There's quite literally no loss of expressive power.
Re: Why I’m dropping Rust
#160Earlier quoted context omitted.
This sounds like a failure of the Rust documentation.
The documentation is supposed to tell you what the language is, not exhaustively detail everything the language is not .