8 ms·
Go Is the New Ruby
- mikece 7y ago“All languages suck, but they all bring interesting concepts as well, that can overall make you a better programmer.” True on so many levels. Learning other languages means learning a new way of thinking due to the reasons those languages were created in the first place. Even if you never change the language you use daily, learning other languages and doing small projects in them will make you better in your “home” language.
- segmondy 7y agoNot true, There are lots of languages that bring absolutely nothing to the table in terms of making you a better programmer. Take something like Elm, it doesn't make you a "better programmer". It does make your program better by being statically typed. Kinda like typescript doesn't make you a better programmer than if you use javascript, but it makes your program better. You can say this for a lot of languages.
- save_ferris 7y agoI don’t agree with this. Using typescript really helped me understand the value of types, which wound up radically changing the way I read and write vanilla JS. I’m much better at recognizing and preventing bugs in vanilla JS because typescript has changed the way I think about JS.
- ubertaco 7y agoUhm, Elm is a really bad example to pick, given how many other languages now have libraries that implement "the Elm architecture" for UIs of various sorts, while Elm itself is almost entirely a "please spit out some HTML" toolkit.
- mkr-hn 7y agoGo really is the easiest language I've used. It installs with no fuss. The VSCode extension sets everything up and works perfectly. The library documentation is so clear that it usually answers any question I have without having to dig up blog posts and without dodging top search result Stack Overflow pages closed without answering the question. The highly opinionated nature means I can go into any Go code base and make sense of it quickly.
- panpanna 7y agoGo 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.
- kerng 7y agoI'd say Go is more like Basic.
- schrodinger 7y agoI’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!!!
- paulddraper 7y agoAnd 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#.
- cpx86 7y agoC# 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.
- littlestymaar 7y ago> 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 the borrowchecker is only a thing while learning) but docs, really?
- tboyd47 7y agoThen what is the new Rails?
- masukomi 7y agothe standard library if you ask most Go developers it seems. It's an old joke that whenever you ask for something like Rails in Go many / most of the devs will tell you to use the standard library. The sad thing is, they actually do that again and again. That being said, someone said "screw that" and built Buffalo https://gobuffalo.io/en https://gobuffalo.io/en which is as close as you can get in Golang at the moment.
- SenHeng 7y agoSomeone should create a Rails-like framework named Go to Gaol.
- throw_m239339 7y agoYou 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 un-serialize directly from the DB, which helps getting rid of ORM when building object graphs.
- badrequest 7y agoI 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 https://github.com/gin-gonic/gin), which is still heavily used.
- throw_m239339 7y ago
- jamil7 7y agoI kinda throught Elixir / Phoenix was the new Ruby / Rails. Nice read none the less.
- Vesuvium 7y agoIndeed. For scripting languages, it's usually Python people moving to go and Ruby people adopting Elixir.
- tcyrus 7y agoWhy would you say something so controversial yet so brave?
- Phillips126 7y agoI enjoy learning new languages. In my day job I spend most of my time writing JS (ReactJS specifically) building dashboards and other internal business tools. Sometimes I need to build API's or perform tasks that just cannot be done in the browser and I take the opportunity to experiment with other languages. A few examples: - We purchased a cheap USB duplicator (10 slots) to copy the contents from a master USB to the clones. It worked, but wasn't a great solution. It was slow, error prone and when it failed you never really knew what USB was having the issues (or what went wrong). Using a Golang backend and ReactJS frontend I created an alternative which had a nice GUI showing what files were copying, the percentages complete, error messages, etc. It was a far better solution and using Goroutines it was fun. We ended up scaling the system to 100 USB's at a time and that was fun to watch (lots of blinky lights :D). The solution didn't take much time to write (Golang was quick to learn) and we finished the duplication WAY sooner than the due date. - We needed to automate a bunch of DNS stuff with CloudFlare. I ended up creating a parser for a custom config we wrote, hooked it up to CF's API and we ran it as a service. The language I used for this project was Nim[0]. I liked the syntax and the final binaries were TINY and FAST. - More recently I was approached by an IT guy at the company that manages all of our software licenses. He showed me this command line tool he uses to query all licenses and goes through the cryptic output trying to figure out what licenses were being used, by whom, etc. I ended up using Go to parse the command and serve a ReactJS application with all sorts of bells and whistles (reports, history, alerts, etc). Since the application is browser-based he can even use it mobile which he loves. - I've been working on some prototype BLE Mesh stuff in C, but that is a ways out and not yet worth mentioning much more. Rust has held my interest for a while as well, just waiting for the right project to come along. [0]https://nim-lang.org/ https://nim-lang.org/
- iam_takada 7y agoOn top of ReactJS, what else do you use to build dashboards and internal business tools?
- Phillips126 7y agoI typically do everything custom these days. In the past I would use Bootstrap, Semantic or one of the many other CSS frameworks but I found that I add a lot of size to my applications when I only used a few things from it. Most features (sidebars, grids, menus...) are simple enough to just implement on your own. I was a graphic designer that moved into development so I feel I have a pretty good sense of design and UX. I do however use various charting libraries out there for ReactJS as they are typically quite well done and small in size. If I need something a little more custom I'll install D3 and build it out. For backend I have used Node/Express quite a bit to serve API's and such. But as mentioned in my previous post lately I've been using system programming languages a lot more for building backend things mostly as a learning exercise and because I have the freedom to do that in my job. Building out these tools and seeing them being used daily from nearly all employees in a ~400 person company is really rewarding. It really gives me a sense of appreciation for the work I do and I get a lot of good suggestions on how to improve the applications that in turn improve the work these employees do. Other things I've used in the past for various projects include Ionic Framework & PhoneGap (mobile app), Zephyr RTOS (BLE Mesh Programming), React Native, Angular, Electron (Visitor Check In/Out Kiosks), and lots of CSS frameworks (too many to name).
- hootbootscoot 7y agoI thought Crystal was... https://crystal-lang.org/ https://crystal-lang.org/
- hootbootscoot 7y agoas for rails, pick your poison https://luckyframework.org/ https://luckyframework.org/ https://amberframework.org/ https://amberframework.org/ https://spider-gazelle.net/ https://spider-gazelle.net/
- karmakaze 7y agoI tried Lucky, Amber, then finally Kemal which is more of a Sinatra. It was the only thing that compiled fast enough to feel productive.
- commandersaki 7y agoI wonder what the authors thoughts is about not having a secret annotation for wiping secrets.
- throw_m239339 7y agoMore like Javascript is the new Ruby and Go is the new Java.
- karmakaze 7y agoI 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'd languages. At the rate of Go language development, Java might get coroutines and value-types before then. I haven't used Rust but I read the "Rust where the compiler constantly shouts “fuck you”" quote differently. I read it as, where the non-existent Ruby compiler will shout “fuck you” in production.
- tln 7y agoThe affinity for the author is in the last line, "Go has become the new Ruby. A language I use to get things done, and enjoy programming again." Good for him
- paulddraper 7y agoIt does seem a weird comparison. It would be hard to find two more different major languages. Go is underpowered, explicit, and statically typed; Ruby overpowered, implicit, and dynamically typed. But I think they're alike because the author likes both of them.
- warmind99 7y agoYeah, 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.
- musicale 7y agoGo is not the new Ruby. Ruby has keyword arguments and optional arguments with defaults. Among [many] other things.
- kyledrake 7y agoA statically typed compiled systems language with anachronistic C semantics and a regressive package dependencies system is never going to be a new high level DSL oriented scripting language. A far better take is that Crystal is the new Go, because it mixes the benefits of a high level language with the benefits of a lower level language, and learned a lot more of the lessons from the ruby and node ecosystems about how to manage code dependencies.
- melq 7y agoI mean this to come of in a non antagonistic way, but did you read the article? You seem to be refuting the title of the article without addressing any of the points made within it.
- pcwalton 7y ago> But, just like in Java, if I need speed, I can preallocate and reuse memory to avoid hitting the GC. No, you can't. Language constructs in Go allocate in ways that are not immediately obvious. When the GC runs, it still has to scan all of that memory, regardless of whether you preallocated it or not, which is especially unfortunate with a non-generational garbage collector like that of Go. Also, I have to say that I really don't get it when people say that they have to think about the borrow checker for a long time before writing a program in Rust. That's not the case for me or anyone else I know.
- skybrian 7y agoOne possibly useful thing to know is that the Go GC doesn't scan non-pointer memory, so if you have big strings, byte arrays, or structs that don't contain pointers, they don't need to be scanned. Also, while the garbage collector may not be generational, it's mostly concurrent. Looks like GC pauses are below 1ms now?
- selfipaprazzi 7y agoMoving to a new job with Perl and Go. I know neither of them. This article has me excited!
- solidsnack9000 7y agoIn more ways than one.
- fleur-de-lotus 7y agoI don't understand the comparison with Ruby. Go, as a language, is underpowered by design. Ruby is "overpowered". Ruby should better be compared with Kotlin and Swift.
- SPBS 7y agoThe key point of the article is that Ruby and Go are similar for being very developer friendly and productive languages. It is not about keyword arguments or the expressive power of the language or something similar. Although it's not explicitly mentioned why Go is the new Ruby, given that both are equally productive, I would assume that it's because Go is much faster where it counts.
- WinonaRyder 7y ago> For me, Go has become the new Ruby. A language I use to get things done, and enjoy programming again. Despite my annoyance with the direction that Go's taken since 1.10, this line really resonates with me. TL;DR Windows + PHP + slow laptop drove me to put away my childish anti-Google fears for a weekend and try Go, and for the first time since I started coding (with Pascal) I enjoyed programming. Cool story: Around late 2010, after a few years of using (btw, Arch) Linux exclusively, I was given a slow Windows laptop for work. The laptop came with Windows Vista IIRC and the whole experience of writing PHP code on an unfamiliar OS combined with a slow laptop was just misery - it was even worse than my memories of Windows ME/XP. I tried everything to get a familiar Linux env going: Cygwin, msys, KDE... and it just added insult to injury. Anyway, soon after, it was Go's birthday so it was in the news again and one weekend I decided to put away my childish anti-Google fears and try it and I never looked back. Something about the simplicity, its lack of CMake, Makefiles, latest build-system-of-the-week, dynamic linking hell, C++ complexity, D and its 2 std libs, etc. was a breath of fresh air. Before even falling in love the the concurrency primitives, I started writing "bash scripts" in Go - something I do to this day. I even started writing prototypes in Go to then port them to PHP and Python because I could write the inefficient, naive, brute-force code to validate an idea... and it'd still end up being faster and use less memory than the code the was deployed to production. I later also discovered that my shitty naive linters written in Go that parsed and checked whole PHP packages every time I saved a file ran near instantly compared to the heavy disk-destroying IDE indexing - it was crazy.
- say_it_as_it_is 7y agoAs in, all of the 10-week crash course in programming people now use Go instead of Ruby to fuck up an entire code base. The people who take the time to make shallow proclamations about how great Go is are never the people actually using it well nor making real contributions at work. They don't ever learn the fundamentals of programming and software engineering. They take 6 coffee breaks a day, chat all day about tech, and never make a difference at work. Go is the new watering hole for low quality talent.