News for hackers. Stuff that matters.
Re:My favorite Rust function by viraptor on Saturday October 12, 2019 @08:09PM (#21237274)
It may be an unnecessary dig, but the author may indeed be familiar with Go and still think it's unacceptably crippled for all their use cases. The whole post is just their opinion.
Re:My favorite Rust function by root_axis on Saturday October 12, 2019 @09:51PM (#21237741)
In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum.
Re:My favorite Rust function by vertex-four on Sunday October 13, 2019 @03:28AM (#21238977)
I occasionally program Go because it has an amazing amount of libraries - I basically use it for random microservice type things that glue systems together. (Most recently, an HTTP login endpoint that sends and receives XMPP messages to authenticate the user.)

I don't like it. I program Rust the rest of the time. I'm considering learning Perl5 so that at least my type system lets me do vaguely expressive things - I'm utterly fed up of half my code looking like:

    foo, err := something()
    if err != nil {
        return nil, someErr{err}
    }
I got very used to Rust's try!() macro, now ? operator, and being able to map over Results to convert between error types in a single line that feels much less noisy - I have functions in Go that are a dozen or so lines that would've been 3 in Rust, and tbh I struggle to follow what the function actually does when 3 out of 4 lines are to do with the failure case.

I would consider "unacceptably crippled" to be a reasonable description of Go, even if it's the best tool I have for some jobs.

Re:My favorite Rust function by root_axis on Sunday October 13, 2019 @12:05PM (#21241113)
"unacceptably crippled" is a pejorative meant to insult, not a descriptive criticism.
Re:My favorite Rust function by AdieuToLogic on Saturday October 12, 2019 @11:23PM (#21238146)
> In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum.

Or maybe they have just expanded their "knowledge spectrum" and are experiencing an effusive moment?

Re:My favorite Rust function by root_axis on Saturday October 12, 2019 @11:43PM (#21238221)
Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.
Re:My favorite Rust function by AdieuToLogic on Sunday October 13, 2019 @01:35AM (#21238565)
It's apparent you have dealt with negative situations such as you describe. Here is a haiku which may be helpful:

  Those who can will do,
  Those who cannot will seek to,
  Hide that fact from you.
HTH
Re:My favorite Rust function by AdieuToLogic on Sunday October 13, 2019 @12:39AM (#21238392)
> Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.

Both points you make I agree with. I simply was offering a possible explanation for those whom exhibit overly passionate opinions when they become enlightened.

When people take an epiphany to the point of denigrating those around them, then they likely have issues beyond what any programming philosophy could possibly encode.

Re:My favorite Rust function by jchw on Saturday October 12, 2019 @08:16PM (#21237304)
Sure, and my opinion is that this is a very shallow takeaway. My whole comment is just my opinion.
Re:My favorite Rust function by bsder on Saturday October 12, 2019 @10:00PM (#21237788)
> if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight.

Um, the whole point of Go was to be "opinionated and acceptably crippled". That's why the creators built it the way they did. Go has more than a few things where "Me, but not for thee" rules--the compiler can do X but you cannot. If you find that is an acceptable tradeoff for the other features of Go, great!

Lots of modern languages, however, are trying to go the other way. They are trying to give the programmer every bit of power that the library/compiler programmers have. This has its own failure modes that you may find unacceptable. That's fine too.

I personally dislike the Rust vs Go discussions. Those two languages in particular really don't have domain overlap and are like comparing apples to screws.

Re:My favorite Rust function by legends2k on Saturday October 12, 2019 @11:52PM (#21238251)
Minor nit: would've been better if you'd put 'screws and apples'. 'Rusty screws' and 'Go apples!' sound better then when interchanged :P
Re:My favorite Rust function by mav3rick on Saturday October 12, 2019 @09:53PM (#21237752)
It is crippled admittedly by the authors themselves. The error checking pattern, no generics etc. are all to keep it "simple" yet are things most other programming languages have. Have you used Rust ? The borrow checker makes a lot of sense.
Re:My favorite Rust function by jchw on Saturday October 12, 2019 @10:10PM (#21237830)
I feel like I shouldn’t have to answer this question, but Yes, of course I’ve used Rust. Why do you question this? I said nothing about Rust at all, other than that I like it, and whether Rust is good or not has little to do with Go being “crippled.”

But of course, Rust is not flawless. In fact up until recently it was kind of annoying, before non-lexical lifetimes became a part of the language. It’s also a very large and complex language compared to Go. This is not unilaterally a bad thing, but just as every line of code comes at a cost, so to does every language feature, and if enough language features fail to pay the rent your programming language will end up feeling bloated.

What Go lacks is exactly its strengths. If you criticize C for not having Java-style exceptions, people will look at you funny. There is some divide in the community over error handling but I defend that Go’s verbose and stupid error handling pattern is my favorite part of the language, and changed how I code inside and outside of Go. I also appreciate Go’s simple but effective patterns for composition-based object oriented programming, and for having a decent concurrency model (not that it is without flaws: the limitation of Go’s memory safety is definitely an issue here.)

Everything comes at a cost. The borrow checker brings immense promise for security, but that does not mean other approaches to memory safety or language design are suddenly obsolete. It’s more complicated than that, and I consider failure to understand this to be a sign that someone is not keeping an open mind.

Re:My favorite Rust function by enraged_camel on Sunday October 13, 2019 @02:21AM (#21238707)
>>What Go lacks is exactly its strengths.

Surely you understand that this is a very self-serving attitude, though?

It's like someone points out that your car is crippled because it has a turning radius of 2 degrees and also has no brakes, and you go, "no but you see, what this car lacks is exactly its strengths! And it's those strengths that I enjoy the most when driving this car!"

Re:My favorite Rust function by baby on Saturday October 12, 2019 @11:07PM (#21238078)
“Crippled” has a negative connotation. I’d say it is not crippled but kept self-contained without a multitude of overlapping features.