Live data from Hacker News

The borrowchecker is what I like the least about Rust

viralinstruction.com

351–360 of 459 posts

Re: The borrowchecker is what I like the least about Rust

#351
post #335
post #277

Earlier quoted context omitted.

> Golang has a whole lot of weird, pointless quirks in both its base language and standard library Having used go in anger I don’t necessarily agree with this, could you point out an example. Maybe I just accepted it and work around it without paying much attention. If you are referring to interface types being able to be null, well they are allocated on the heap and have dynamic dispatch, this isn’t particularly a s…

Here’s a great read on its quirks, and where it really isn’t “simple”: https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-... https://dave.cheney.net/2014/03/19/channel-axioms

Your "great read" is horrible.

Re: The borrowchecker is what I like the least about Rust

#352
post #162
post #155

Earlier quoted context omitted.

[flagged]

I think that's harsh. IME Go excels in a business setting where the focus is on correct, performant, maintainable, business logic in larger organizations, that's easy to integrate with a bunch of other systems. You can't squeeze every last bit of low-level performance out of it but you can get ... 9x% of the way there with concurrent code that is easy to reason about.

> correct, performant, maintainable, business logic

That's the requirement for 100% if professional software development.

Re: The borrowchecker is what I like the least about Rust

#353
post #273

Earlier quoted context omitted.

Unfortunately, Golang has a whole lot of weird, pointless quirks in both its base language and standard library, compared to something with a more elegant and from-the-ground-up design, like Rust itself or perhaps OCaml/ReasonML. Not very good news if you want the language to just "get the hell out of your way". I suppose it's still way better than the "enterprise" favored alternative of Java/C# though!

I worked with C# for a decade and it's become a really great general purpose language. I'd still prefer never to work with it ever again after having worked with Go. This isn't for technical reasons at all, but because Golang is so easy to work with for "people reasons". There are brilliant parts of Go, but the only thing I find myself missing in other languages is the simplistic module isolation, where every folder…

> I hate the fact that they didn't want runtime assertions as an example,

So you hate writing:

    if (something != 1) {
     panic("oh no!")
    }
vs

    assert(something != 1, "oh no!")
? Reminds me of people complaining about Python's significant indentation. If that's what you're complaining about, you have nothing to complain about.

Re: The borrowchecker is what I like the least about Rust

#354

I don't use Rust much, but I agree with the thrust of the article. However, I do think that the borrowchecker is the only reason Rust actually caught on. In my opinion, it's really hard for a new language to succeed unless you can point to something and say "You literally can't do this in your language" Without something like that, I think it just would have been impossible for Rust to gain enough momentum, and also…

Agreed. As a comparison Golang was sold as "CSP like Erlang without the weird syntax" but people realized channels kind of suck and goroutines are not really a lot better than threads in other languages. The actual core of OTP was the supervisor tree but that's too complicated so Golang is basically just more concise Java. I don't think this is a bad thing but it's a funny consequence that to become mainstream you ha…

> goroutines are not really a lot better than threads in other languages

They are though. Even Java people agree, Java recently got their implementation of goroutines (green threads). It's a superior model to async for application level programming.

Re: The borrowchecker is what I like the least about Rust

#355

Earlier quoted context omitted.

The "X is like Y but Z" game w languages is pretty fun, and kind of illuminating as to what one thing you pick. Go is like C but with concurrency/strings/GC/a good stdlib Go is like C++ but simpler/fast compilation/no generics/a good stdlib Go is like Python but statically typed/multithreaded/fast/single executable Go is like Java but native/no OO --- One thing Go haters rarely reckon with is that Go is the only popu…

> One thing Go haters rarely reckon with is that Go is the only popular modern language (ie from this millennium). This requires you to squint so that "popular" happens to identify only a handful of languages but conveniently catches Go and not say Swift or Rust. It's not difficult to do this, but it's not very honest to yourself.

Swift isn't a general purpose language and Rust is not suitable for general application development; it's also much less popular.

Re: The borrowchecker is what I like the least about Rust

#356
post #350

Earlier quoted context omitted.

Unfortunately, Golang has a whole lot of weird, pointless quirks in both its base language and standard library, compared to something with a more elegant and from-the-ground-up design, like Rust itself or perhaps OCaml/ReasonML. Not very good news if you want the language to just "get the hell out of your way". I suppose it's still way better than the "enterprise" favored alternative of Java/C# though!

> Rust itself or perhaps OCaml/ReasonML So compared to... very niche languages? Go has exceptionally few quirks compared to mainstream languages.

Rust is a mainstream language

Re: The borrowchecker is what I like the least about Rust

#357

Earlier quoted context omitted.

> One thing Go haters rarely reckon with is that Go is the only popular modern language (ie from this millennium). Everything else is way older. Rust. TypeScript. Swift.

I wrote a reply to a sibling comment here [0], but wanted to reemphasize that Rust and Swift are far from popular. I think it bears repeating because the gap between a Rust/Swift and Go is notable, but the gap between a Rust/Swift and Java is a chasm. I would guess this isn't the intuition of an HNer (it wasn't mine until I dug in for this discussion haha)

The median number of users across all programming languages is zero. Millions of people around the world use Rust and Swift, so it seems like a stretch to say they're far from popular. If Rust isn't a popular language compared to Java, we might just as well say Java is not a popular language compared to Excel.

Re: The borrowchecker is what I like the least about Rust

#358

Earlier quoted context omitted.

Non-hobby languages is a narrow club, yes. Your list is at least missing PHP, Typescript, Swift, Go, Lua, Ruby and Rust though. But Ocaml really doesn't belong anywhere close to this list.

Ummm Lua? It's a nice little scripting language, but literally never seen a job ad for a job using mostly Lua. It's almost the definition of hobby language... OCaml runs software that billions use, is used by financial and defense firms, plus Facebook. But Lua? By that metric I'm throwing in every language I've ever seen a job for... R, Haskell, Odin, Lisp, etc... Edit - this site is basically a meme at this point. R…

LuaJIT is widely used for writing Nginx plugins.

Re: The borrowchecker is what I like the least about Rust

#359

Earlier quoted context omitted.

Flamebait? It's literally what the designers of Golang said publicly about the background of prospective developers, and how that constrained the language design: "The key point here is our programmers are Googlers, they’re not researchers. They're typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They're not capable of understanding a brilliant lang…

Nowhere in this quote are these fresh grads equated to "lousy programmers", though (which the flamebaity comment did). And interpreting the quote charitably I'm going to have to agree with it - I don't think many of my coworkers care enough to get to the point where they'd appreciate everything something like Haskell can do for them.

Have you ever worked with fresh grads? They're definitionally lousy programmers, if we take lousy mean "having a propensity to inject bugs into programs".

Re: The borrowchecker is what I like the least about Rust

#360
post #355

Earlier quoted context omitted.

> One thing Go haters rarely reckon with is that Go is the only popular modern language (ie from this millennium). This requires you to squint so that "popular" happens to identify only a handful of languages but conveniently catches Go and not say Swift or Rust. It's not difficult to do this, but it's not very honest to yourself.

Swift isn't a general purpose language and Rust is not suitable for general application development; it's also much less popular.

> Swift isn't a general purpose language and Rust is not suitable for general application development

How do you figure Swift is not a general purpose language ?

Post reply on HN