Why do people like Rust so much? The borrow checker is a huge PITA.
vec.push(vec.len())
^ That won't work
:3:14: 3:17 error: cannot borrow `vec` as immutable because it is also borrowed as mutable [E0502]:3 vec.push(vec.len()); ^~~:3:5: 3:8 note: previous borrow of `vec` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `vec` until the borrow ends:3 vec.push(vec.len()); ^~~:3:24: 3:24 note: previous borrow ends here:3 vec.push(vec.len()); ^
MIR will hopefully fix some of those pain points. A lot of the time these situations are easily fixed with more code, but there are some things that push the limits of the borrow checker.
Fixed: let len = vec.len(); vec.push(len);
Adam Price
I like Rust because it's a systems language that provides some nice guarantees. Modern C++ also has some of these, but the language is too much of a mess for me to want to deal with it.
The Rust community is pretty shit though.
Julian Hughes
Personally, Rust being "safe" is one of the worst language choices I have seen. By making itself safe, it makes every single little thing convoluted. This sucks because other than it being too safe, a lot of the language is nice, but it gets trashed because OHMIGOD MY SINGLE THREADED PROGRAM MIGHT DO AN BAD!1!111!!!1
Ryan Sanchez
Type systems have turned into a fetish. More and more complex systems are piled on top of each other in a rush to make the result "more secure" or "easier to understand" while ignoring that actual security and understanding require you to fully comprehend the complex systems as well.
Jaxon Torres
Without safety, there is no reason to use Rust as it is worse in every way than C++.
Jace Gutierrez
there's no point in criticizing their design goals. if you don't like automatic safety please don't try to use Rust
this
Camden Butler
B...But muh safety!!!
Never mind that other languages (like C++) already have all the safety features needed (RAII, smart pointers, static typing, etc). No, learning from one's mistakes, not coding like a moron and becoming more familiar with the underlying machine are very triggering to the retarded social justice hipsters that make up 90% of Rust's community.
Brody Nelson
You have no idea what you're talking about.
Oliver Bailey
People like rust as much as webdevs like javascript. It's a fad.
Typical posts in hugboxes for example
And these posts get a really high amount of upvotes on sites like plebbit and hackrnews
Neither do you apparently, sepples has had raw pointer checking for a while now, and other killer features of rust are no longer exclusive.
Plus c++ actually has the common courtesy of making it humanly readable if a program is legal or not.
Jeremiah Barnes
You have no idea what you're talking about.
Sebastian Anderson
The more caught by static analysis, the better. I respect their compiler work and hope it means fewer daily CVEs. That's about all I have that's good to say about it.
Joshua Williams
it's literally the only tool you can use for front-end interactivity, dumbass
James Bennett
...
Kayden Perry
...
Angel Ward
Fantastic counterargument, chap. How clueless do you need to be to not be able to make safe code even with those features? Do you just uncontrollably call operator new everywhere and return pointers to local non-static variables?
Angel Fisher
The people who dislike it don't actually write code and are thus irrelevant.
Nathaniel Morales
...
David Gonzalez
He probably meant Javascript libraries. You know, shit like arithmetic.js, the out of the box solution for addition (requires JQuery)
Jace Foster
Even though I wasted too much time trying to learn dependently-typed programming languages, I have to agree with you. I think the Software Engineering field took a wrong turn somewhere. We should have moved to things like Cyclone or Oberon. Instead, all the money sloshing around anything connected with the Web fucked up the natural evolution, and people now think Rust/Nim/whatever is "innovative". Nowadays I'm using Oberon-07 as a hobby, but I think the field just needs a few "Tay Bridge Tragedies" before we're whipped into shape by legislation.
Levi Wilson
Why do you keep replying? Fucking christ you're a moron. Safe code in rust's context is guaranteed safe. That's a lot different than using unique_ptr. Kill yourself twice.
Christian Perez
It's guaranteed to be unnecessarily annoying to write and make you wrestle with a shitty borrow checker, apparently. How much must one flagellate oneself in the name of those safety guarantees?
Joshua Thompson
The only reason why I use python for webshit is I want those safety guarantees. I'm old enough to have gone through the web's IIS + DLL phase where websites were written in C++ and it was a nightmare of crashes and security holes.
Connor Brown
Why even though? If anything, learning these languages makes you a better source on their shortcomings. I came to this conclusion when Haskell was consumed by Kmett's "abstraction for abstraction's sake" school of design. While I share your sentiment, I doubt legislation will do a lot to change things since at least in my country, legislators are hilariously incompetent when it comes to technology and I doubt it's better elsewhere.
Oberon has been on my radar for a while, got any pointers to where I should start? You are not by chance nand or fuuzetsu, right?
Henry Sullivan
Just another user here, but it's not surprising that a good idea would be found several times independently.
If you want to use it for paying jobs, astrobe.com/default.htm looks good but I never tried it.
Brayden Gray
I saw this post on lobsters about the claims of type systems with regards to safety and preventing bugs, turns out test driven development has a far greater impact than a languages type system
Oh, it's Oberon shill. I really don't see what killer feature Oberon has that many other languages don't.
Aiden Bell
Whatever, man. The language itself is not very innovative at all. The one nice thing I can think of is that Wirth was aiming for some of the ease-of-use of an interpreter in a compiled language. Things like fast 2 opcode null pointer, array bounds and run-time subtype checks; and a very fast compiler. Reminds me slightly of Go that way, but without the requirement for several million lines of compiler and OS underneath.
What I like is the simplicity of the Oberon *implementation*, i.e. TCB. It feels like something I could fork and maintain myself if I had to (3 KLOC compiler, 10-12 KLOC OS, 1 KLOC Verilog, and a good book to explain it all).
Jaxon Garcia
Thanks. I didn't expect this language to have its own hardware, but that makes it even better.
From the first linked study blog post: This is meaningless. According to this metric, a language with few but big and old projects on Github (such as Haskell) has a higher bug density than something like Javascript in which everyone and their dog has multiple repos on the site. Filtering for "a few stars" makes it even worse because "x.js - the library for crossing out text" gets 300 stars via advertising on Reddit and Hackernews.
>the famous study from Microsoft, IBM, and Springer Some people should stop writing about studies and science, seriously.