Live data from Hacker News

Go Is the New Ruby

00f.net

51–60 of 61 posts

Re: Go Is the New Ruby

#51

I don't really get the affinity of Go and Ruby. The most similar thing I could say about them both is that they're both not Java. This makes sense from a hiring sense, either your hiring from the large Jvm/.Net pools or you're not. I suppose both Ruby and Go have less steep learning curves compared to Java/Kotlin/Scala. I can't wait until Go v2 gets generics then I can use it like other statically-typed compiled, gc'…

Yeah, new Rust programmers always fight the borrow checker. Once you get used to it though, Rust's compiler is literally orgasmic. It has a build in spell checker for christ sake.

Re: Go Is the New Ruby

#52

Earlier quoted context omitted.

I’m a devout Go developer and I feel like this is accurate. It’s got some uglies (eg no generics, verbosity in general), but man, overall, it’s so pleasant to work with. Which is probably how great Java developers feel. Thanks for inspiring empathy!!!

And Java also didn't start with generics either. They were bolted on later. Which is why it uses type erasure for generics rather than reification like C#.

C# didn't either, it was introduced in C#/.NET 2.0. As I've understood it, Java chose type erasure to stay backwards compatible with older JDK versions, whereas .NET instead chose to break compatibility with 1.x and force dependents to target 2.0.

Re: Go Is the New Ruby

#53

Earlier quoted context omitted.

You can't have Rails in Go. I mean you can, but "go advocates", would crap on your work with an endless litany of articles about why whatever you wrote shouldn't be used because it's not the "go way". Remember Martini? That's right you don't. Fortunately for Go, the biggest pain in the ass when it comes to web development is kind of a solved problem with the use of JSON support in SQL Dbs. All you have to do then is…

I have no idea where all this salt comes from about go advocates, but there are plenty of Rails-likes in Go that are accepted and used by the community. Buffalo is probably the most Rails-ish (from a glance, I've not use Rails extensively), and it's maintained/advocated for by folks who have long been pillars of the community. Martini was effectively replaced by Gin ( https://github.com/gin-gonic/gin ), which is stil…

Martini wasn't replaced by Gin, 2 different developers.

Buffalo uses code generation sure, but it doesn't make an extensive use of interface {} like Martini did, thus can't really be compared to Rails in terms of polymorphism.

Re: Go Is the New Ruby

#54

Earlier quoted context omitted.

Go is the new Java. It runs everywhere, is easy to learn and use and people who don't get it hate it with passion. Anyway, comparing go documentation with rust docs, I'm surprised anyone can get any work done with rust.

> Anyway, comparing go documentation with rust docs, I'm surprised anyone can get any work done with rust. That's an unexpected comment. Rust has among the best documentation I've seen, and arguably the best ecosystem around documentation, which helps a lot and encourage third party developers to write high quality doc. I understand when people complain about the learning curve (like this article, because fighting th…

I am not a fan of Rust’s documentation. To take one example: sending a HTTP request. There is tons of documentation of properties of the the HTTP classes built into the standard library, but it is extremely hard to find an example of working code. Wouldn’t a simple usage example of something like sending a single HTTP request be one of the most useful things to document?

As far as I can tell, the best-documented approach is to use some external library and ignore the http support built into Rust.

Re: Go Is the New Ruby

#55
post #54

Earlier quoted context omitted.

> Anyway, comparing go documentation with rust docs, I'm surprised anyone can get any work done with rust. That's an unexpected comment. Rust has among the best documentation I've seen, and arguably the best ecosystem around documentation, which helps a lot and encourage third party developers to write high quality doc. I understand when people complain about the learning curve (like this article, because fighting th…

I am not a fan of Rust’s documentation. To take one example: sending a HTTP request. There is tons of documentation of properties of the the HTTP classes built into the standard library, but it is extremely hard to find an example of working code. Wouldn’t a simple usage example of something like sending a single HTTP request be one of the most useful things to document? As far as I can tell, the best-documented appr…

Rust’s standard library has no http support, so this post is a bit confusing to me.

Re: Go Is the New Ruby

#56
post #54

Earlier quoted context omitted.

I am not a fan of Rust’s documentation. To take one example: sending a HTTP request. There is tons of documentation of properties of the the HTTP classes built into the standard library, but it is extremely hard to find an example of working code. Wouldn’t a simple usage example of something like sending a single HTTP request be one of the most useful things to document? As far as I can tell, the best-documented appr…

Rust’s standard library has no http support, so this post is a bit confusing to me.

This stuff, for example:

https://docs.rs/http/0.1.19/http/request/index.html

"standard library" is probably not the correct term for this in Rust-world because it is under the "http" namespace rather than the "std" namespace. I just meant, "the stuff you use via typing `use http`".

Re: Go Is the New Ruby

#57
post #56

Earlier quoted context omitted.

Rust’s standard library has no http support, so this post is a bit confusing to me.

This stuff, for example: https://docs.rs/http/0.1.19/http/request/index.html "standard library" is probably not the correct term for this in Rust-world because it is under the "http" namespace rather than the "std" namespace. I just meant, "the stuff you use via typing `use http`".

Yes, that is not the standard library, that’s a third party package. Its documentation does explain that it’s not a client or server.

Re: Go Is the New Ruby

#58
post #56

Earlier quoted context omitted.

This stuff, for example: https://docs.rs/http/0.1.19/http/request/index.html "standard library" is probably not the correct term for this in Rust-world because it is under the "http" namespace rather than the "std" namespace. I just meant, "the stuff you use via typing `use http`".

Yes, that is not the standard library, that’s a third party package. Its documentation does explain that it’s not a client or server.

Hmm. Its documentation doesn't explain that very well at all, to me.

I am comparing the experiences of:

1/ Trying to do some http requests in go, searching for "golang http", and coming across the fairly well documented standard "net/http" library in go, at https://golang.org/pkg/net/http/

2/ Trying to do some http requests in rust, searching for "rust http", and coming across this as the first result:

https://docs.rs/http/0.1.19/http/

which includes statements like

"It's intended that this crate is the "standard library" for HTTP clients and servers without dictating any particular implementation."

That's cool, I don't mind if no particular implementation is dictated to me. I just want to know how to use it by reading this documentation... but that never becomes possible.

You could say the problem isn't that rust is documented poorly, the problem is that the standard library is missing some things that are in the standard library of other languages, and it's those third-party libraries that are documented poorly.

Re: Go Is the New Ruby

#59
post #58

Earlier quoted context omitted.

Yes, that is not the standard library, that’s a third party package. Its documentation does explain that it’s not a client or server.

Hmm. Its documentation doesn't explain that very well at all, to me. I am comparing the experiences of: 1/ Trying to do some http requests in go, searching for "golang http", and coming across the fairly well documented standard "net/http" library in go, at https://golang.org/pkg/net/http/ 2/ Trying to do some http requests in rust, searching for "rust http", and coming across this as the first result: https://docs.r…

The big issue here, is that you assume that you can get the same ultra-light Google search to give you the same answer for Go and Rust. That's a totally unrealistic expectations! If you google “nodejs http”, “PHP http”, “python http” or “Java http” you don't have the answer you're looking for either!

“How to perform an http request in Rust” is a Google query that makes much more sense, and works for all the aforementioned languages.

Re: Go Is the New Ruby

#60
post #58

Earlier quoted context omitted.

Hmm. Its documentation doesn't explain that very well at all, to me. I am comparing the experiences of: 1/ Trying to do some http requests in go, searching for "golang http", and coming across the fairly well documented standard "net/http" library in go, at https://golang.org/pkg/net/http/ 2/ Trying to do some http requests in rust, searching for "rust http", and coming across this as the first result: https://docs.r…

The big issue here, is that you assume that you can get the same ultra-light Google search to give you the same answer for Go and Rust. That's a totally unrealistic expectations! If you google “nodejs http”, “PHP http”, “python http” or “Java http” you don't have the answer you're looking for either! “How to perform an http request in Rust” is a Google query that makes much more sense, and works for all the aforement…

I disagree.

Searching for [python http] works fine. Top result is this page:

https://docs.python.org/3/library/http.client.html

which explains precisely how to send http requests.

Searching for [nodejs http] works fine as well. You get this page:

https://nodejs.org/api/http.html

Which does, in fact, give you a library that can make http requests.

I won't dig into php and java because I'm not familiar enough with those languages to say what a decent way of sending http requests is.

Finally, searching for [how to perform an http request in rust] does not work! It sends you to https://docs.rs/http/0.1.5/http/request/index.html which is the same fundamentally broken library as you get with [rust http].

In conclusion, the Rust documentation is worse than any of Go, Python, or Node.

Post reply on HN