News for hackers. Stuff that matters.
Re:What Is Rust's Hole Purpose? by PaulDavisThe1st on Friday February 18, 2022 @11:06AM (#30387469)
This was interesting:

> At this point, while reflecting on that topic, I decided to look more into the origins of the drill/hole adage; that diversion led me to a lovely post critiquing the adage, saying it “doesn’t go far enough.” The heart of the argument there is that people don’t want holes either. [... ]

but then TFA didn't actually go there for Rust. After laying out a great example of how the purpose of a hole is ultimately about time (and possibly frustration), the author fails to reach a similar end-goal for Rust, despite hinting at it:

> But, thinking of the drill/hole adage, I stopped and asked myself: “Who wants safety? Is it an end in itself? If it is merely a means to an end, then to what end?”

What is the true end-goal? Saving lives/money/property by avoiding errors?

Re:What Is Rust's Hole Purpose? by pphysch on Friday February 18, 2022 @11:42AM (#30387943)
I had a similar thought; TFA:

> Can I just say “Rust developers spend less time debating about who is responsible when issues arise, and they spend less time figuring out how to get a performant solution into shape”?

The author sneaks in the assertion that issue attribution is the primary cost of issue resolution. I don't think this is true at all. What about actually writing & testing the patch?

If Rust has a technical approach to solving issues, then Go has a social approach. The latter is so darn simple that an intermediate Gopher can grok a codebase and contribute patches relatively quickly. Go is easy to hack; it's C with garbage collection and concurrency primitives (and an excellent ecosystem). That's why it was made!

I think Rust's primary value proposition is expressiveness. People enjoy writing Rust, because they can represent complex ideas with few LOC. Safety is a distant second. It's a language for enthusiasts, not products.

If you want language where safety is truly #1, well, Ada is going on half a century of usage in safety-critical systems including aerospace.

Re:What Is Rust's Hole Purpose? by friedman23 on Friday February 18, 2022 @01:34PM (#30389363)
Go is a language for people that think being able to learn a programming language in a couple of hours makes it good. C-like syntax is not an inherently good thing, it's just familiar. Thus Go is good for people who don't like to learn and/or find learning difficult.

Simple constructs such as sum types do not exist in Go. How do you express that a value is either type A or type B in Golang? Go, in its infinite simplicity, does not allow for that, instead it allows you to express that a value can be type A or type B, type A and type B, or neither! Simple right!

And then errors! Go takes the simple approach with regards to incorrect code in that it just does not care if your code handles all possible error states or not! Simple, just don't give a shit!

If your career is in software and your decision making process for a programming language is "what can I learn in an hour?" then your decision making abilities are questionable.

Re:What Is Rust's Hole Purpose? by taylodl on Friday February 18, 2022 @03:22PM (#30390562)
> If your career is in software and your decision making process for a programming language is "what can I learn in an hour?" then your decision making abilities are questionable.

I posit Rust has a poor return on investment. If you're going to spend time learning a new language then make it a language that completely changes how you think about programming: something like Clojure, Scheme or Haskell. Even if you never create a single system using these languages you will be a better programmer for having learned them. I'm not so sure the same can be said for Rust.

Re:What Is Rust's Hole Purpose? by friedman23 on Friday February 18, 2022 @07:32PM (#30393174)
It's not about learning either. It's about what tool generates the best output.
Re:What Is Rust's Hole Purpose? by pphysch on Friday February 18, 2022 @02:39PM (#30390143)
You can represent sum types with type assertions on interfaces.

Frankly, outside of subjective error handling preferences, I don't see much value in sum types. They encourage building towers of type abstractions and obscure what is happening on the wire.

Re:What Is Rust's Hole Purpose? by friedman23 on Friday February 18, 2022 @07:33PM (#30393190)
> obscure what is happening on the wire

They obscure nothing, sum types in rust have 0 overhead. You cannot in go faith argue that Go gives a more accurate representation of what occurs "on the wire" than Rust.

Re:What Is Rust's Hole Purpose? by zozbot234 on Friday February 18, 2022 @11:47AM (#30388017)
No, Go is "simple" but big Go codebases are not going to be simple. It will actually be simpler to get onboard on a larger Rust codebase, because Rust offers a higher variety of tools to define modularity boundaries.
Re:What Is Rust's Hole Purpose? by pphysch on Friday February 18, 2022 @11:49AM (#30388060)
Go has interfaces and namespaced packages. Not everyone uses them effectively. Codebases can always be overcomplicated by careless abstractions, even in the simplest language.

> Rust offers a higher variety of tools to define modularity boundaries.

"Higher variety" is among the last things I want when trying to understand a big new codebase.

Re:What Is Rust's Hole Purpose? by ParetoOptimal on Friday February 18, 2022 @12:53PM (#30388859)
> No, Go is "simple" but big Go codebases are not going to be simple.

Can you expand on this? I actually lean towards the same belief but wants to hear your reasons.

Can any gophers suggest one or more exemplars of simple big codebases for us to test our beliefs on?

Re:What Is Rust's Hole Purpose? by Ar-Curunir on Friday February 18, 2022 @12:51PM (#30388831)
> I think Rust's primary value proposition is expressiveness. People enjoy writing Rust, because they can represent complex ideas with few LOC. Safety is a distant second. It's a language for enthusiasts, not products.

What nonsense. Companies across the board are adopting Rust not because it has some hype behind it, but because it solves real problems, like memory safety and performance.

Re:What Is Rust's Hole Purpose? by pphysch on Friday February 18, 2022 @02:20PM (#30389953)
Go and Rust are from the same generation of programming languages. Yet one is building mass-adopted software like Kubernetes and Hashistack and Prometheus/OpenMetrics, while the other is pretty firmly in hype & thinkpiece phase.

I can't imagine a serious blog post in 2022 questioning the purpose of Go because it is evident in the large amount of enterprise software being written in it.

Re:What Is Rust's Hole Purpose? by zozbot234 on Friday February 18, 2022 @02:50PM (#30390262)
> Go and Rust are from the same generation of programming languages.

Go 1.0 was released in 2012 and the language has barely gained any highly impactful features since then (generics aside, which are quite new still). Rust 1.0 was not out before 2015 and the 2018 edition already introduced huge changes, with more in the pipeline even today. It hardly seems sensible to describe them as being in the "same generation".

Re:What Is Rust's Hole Purpose? by pphysch on Friday February 18, 2022 @03:46PM (#30390849)
Fortran: 1957

C: 1972

Go first (real) commit = 2008

Rust first (real) commit = 2010

Versioning schemes are incomparable. The two langs are from the same generation, period. To suggest otherwise requires mental gymnastics.

Re:What Is Rust's Hole Purpose? by 3pt14159 on Friday February 18, 2022 @11:12AM (#30387540)
I find it kinda amusing that the New York Times lead reporter on cybersecurity has a book out literally called "This is How They Tell Me the World Ends" and we're on the worlds premier hacker forum pondering about the point of safety in software languages.
Re:What Is Rust's Hole Purpose? by PaulDavisThe1st on Friday February 18, 2022 @12:07PM (#30388269)
You seem to be trying to make the point that is should be completely obvious what the point of safety is.

And yet so much (not all, but a substantial part) of what that book is about has very little relationship to language safety. Rust will not protect you if there's a backdoor left in the system. Rust will not protect you if there's no password, or absurdly weak passwords. Rust will not protect you if your entire system design is predicated on a perimeter defense with no internal checks. Etc. etc.

Now, I'm not so stupid as to believe that we shouldn't do all we can, and that can include language safety. But by itself, that doesn't have a lot to do with the huge end goal laid out in the book, which might be summarized as: be able to build computational systems and networks that are extremely resistant to unintended access, utilization and modification in pursuance of personal, political or national goals".

Re:What Is Rust's Hole Purpose? by 3pt14159 on Friday February 18, 2022 @01:49PM (#30389549)
> And yet so much (not all, but a substantial part) of what that book is about has very little relationship to language safety.

Yes, yes. I know that.

But we literally have a book floating around around THE END of the WORLD and us nerds can't justify even the first step around fixing these systems. It's like someone asking what good fire hydrants are since they won't help with battery fires.

Re:What Is Rust's Hole Purpose? by avgcorrection on Friday February 18, 2022 @12:36PM (#30388616)
I can’t believe people care about cybersecurity when climate change is a bigger threat to us all ad nauseam.
Re:What Is Rust's Hole Purpose? by PaulDavisThe1st on Friday February 18, 2022 @12:46PM (#30388749)
They don't need to be mutually exclusive. They operate on different time scales too (or can). And the nature of the solutions is fairly different in each case. Were someone actually able to hack into a power generation plant and destroy it, they might actually intersect in some way.
Re:What Is Rust's Hole Purpose? by avgcorrection on Friday February 18, 2022 @12:55PM (#30388891)
Meanwhile PL design (in particular memory safety) doesn’t impact cybersecurity? That seems to be the indirect implication (going by GP).
Re:What Is Rust's Hole Purpose? by PaulDavisThe1st on Friday February 18, 2022 @01:49PM (#30389552)
My point about PL design was that it may not be the most important issue with cybersecurity, and that even if it was, there are still many other important issues that it does not impact.
Re:What Is Rust's Hole Purpose? by skybrian on Friday February 18, 2022 @11:28AM (#30387758)
Have you read it? Is it good? Maybe submit a link to a review?