Live data from Hacker News

The Go Programming Language and Environment

cacm.acm.org

111–120 of 250 posts

Re: The Go Programming Language and Environment

#111
post #58

For me it were four things: 1) no bloat 2) great tooling 3) speed, speed, speed 4) developed by legends in Computer Science To expand a little bit more: 1) Go is still the only language is not developed by analogy (i.e. let's do X because all other languages have it). It's designed from the first principles, and that's why so many newcomers are buffed about weirdly different take on things they consider "basic" or "c…

> newcomers are buffed about weirdly different take on things they consider "basic" or "common sense"

Yep makes sense: "2006-01-02 15:04:05"

Re: The Go Programming Language and Environment

#112
post #71

For me it's development speed through compile time and easiness. Extending my service is so fast. Just write the the code, compile it in seconds and it mostly works 90% first try. Love it so much.

> Extending my service is so fast. Just write the the code, compile it in seconds and it mostly works 90% first try. This basically describes... every popular programming language. How would this be different in f.e. C#? Compile times might be a tad bit faster but that's about it?

No even anymore, for most changes done in C# using web apis (what go does best), you don't even have to recompile the entire code. It's actually faster doing it in C# by just `dotnet watch` and let hot-reload do its thing.

Re: The Go Programming Language and Environment

#113
post #78
post #60

Earlier quoted context omitted.

> The amount of Go projects in Cloud Native Foundation shows otherwise. That says nothing at all, actually. Beyond the transparent appeal to authority, why would anyone take decisions seriously when they are made without any technical merit in mind and just follow a mix of cargo curlting and pushing in-house tools, such as the case of the kubernetes migration to Go? > Most people pick languages based on platforms, no…

Docker took the decision to pick Go when it was at version 1.2, hardly that much proven into the battlefield. In 2014 unless we are talking about Ada, there were hardly any better alternatives to C++. If Go is so much better, why does Python eco-system keeps using C++ instead of Go for ML libraries?

One reason is that the Go runtime makes building FFI interfaces rather complex.

Re: The Go Programming Language and Environment

#114
post #88
post #3

* "easy" concurrency * rich standard library, particular for internet facing apps * "simple" language * single binaries * massive corporate support * rich or full toolset The first and second point fortunately "coincided" with: the move to multi-core chips, and the "second" dot.com boom of the 2010s. Which you could probably attribute to the rise of (Google) Chrome, and the decline (finally!!) of IE6, which held back…

The concurrency is "easy" in that the syntax for spawning a thread is simple... but that's kind of it. Like other languages, it has a concurrent queue abstraction, and it has some syntax sugar to make using the concurrent queue nicer than some other languages. But like other languages, you end up in concurrency hell with mutexes and condition variables and semaphores and deadlocks. It has a concurrency story that's a…

Strongly disagree. Yes, it is not a free lunch but they have made several deliberate decisions. If you code your Go like you would C++, you are not using the language in its intended fashion.

They have nice features like a data race detector and deadlock detector.

Channels are not just a concurrent queue, they have nice deliberate things built into them. They are based off of Communicating Sequential Processes (CSP), which has influenced other languages like Rust and Erlang as well.

Green threads are very cheap, and therefore remove yet another thing to think about when using threading. They have made good decisions around the memory model for them as well.

When I worked in C, the first thing we’d do in a new program is introduce a green thread-like scheduler so we could achieve concurrency. Then achieving parallelism is as simple, heh, as bumping up the number of worker threads and fixing the data races. Go handles both of this for you from the start.

So sure, when you are aware of sound multi threading design, know what TSAN is, and have a lot of experience with C++ you can look at Go and scoff and say Rust is better.

But for 90% of the programmers I meet in my career, especially those who grew up in the age of the internet, they do not have experience with this and greatly benefit from Go.

I am in probably one of HN’s “most coveted” engineering companies, and barely anyone has worked in largely multithreaded programs. It is such a problem that we are now splitting services into processes to avoid handling multithreading.

But over in our Go-world this is just not a concern. Seriously, Go is designed really well for backend services. I used to hate on it a lot, but after working at larger tech companies I have bought into it more for those use-cases.

Re: The Go Programming Language and Environment

#116
post #58

For me it were four things: 1) no bloat 2) great tooling 3) speed, speed, speed 4) developed by legends in Computer Science To expand a little bit more: 1) Go is still the only language is not developed by analogy (i.e. let's do X because all other languages have it). It's designed from the first principles, and that's why so many newcomers are buffed about weirdly different take on things they consider "basic" or "c…

> newcomers are buffed about weirdly different take on things they consider "basic" or "common sense" Yep makes sense: "2006-01-02 15:04:05"

Oh yes, great example.

It's literally "1st month, 2nd day, 3rd hour, 4th minute, 5th second, 6th year, 7th timezone"

Clever mnemonic tecnhique which is much easier to use and memorize. Most people can remember "January 2nd 2006" and "15:04:05" easily, and then crafting date/time format strings becomes a toy.

While with more widespread and common "HH/MM/SS" approach, which has bunch of incompatible implementations in different languages, you have to constantly do mental gymnastics remembering if "MM" means minutes or months, and whether "Y" or "yyyy" represents full year.

Format string "D m y", for example, produces:

- 'Tue 05 22' in PHP

- '05/31/22 05 22' in Ruby and Rust

- 'D 40 22' in .Net

- '151 23 2022' in Dart and Swift

I have no idea how such a messy and suboptimal approach to date formatting even makes sense to people. But of course, many people are bashing Go date formatting simply because it's not what they used to in other languages.

Re: The Go Programming Language and Environment

#117
post #2

Weird article. It's basically an 'edited highlights' summary of another article, which it references. Here's the original: https://cacm.acm.org/magazines/2022/5/260357-the-go-programm... I guess this is what passes for journalism, these days.

Ok, we've changed to that from https://thenewstack.io/what-made-golang-so-popular-the-langu.... Thanks!

Related:

The Go Programming Language and Environment - https://news.ycombinator.com/item?id=31173395 - April 2022 (40 comments)

Re: The Go Programming Language and Environment

#118

I think it misses * Made by really famous veteran language designers * Backed by Google Not saying it doesn't deserve its popularity, but most of the things listed are not necessary for explaining its popularity, and none of them (even taken together) are sufficient.

(Submitted title was "What made Golang so popular? The language’s creators look back". We changed the title when we changed the URL - see https://news.ycombinator.com/item?id=31571574)

Re: The Go Programming Language and Environment

#119

Earlier quoted context omitted.

>> Made by really famous veteran language designers Yeah that’s a positive >> Backed by Google But that’s a negative, https://killedbygoogle.com/ I definitely think you’re too fast to dismiss the language features contributing to popularity. As an example: Fast builds are a positive developers immediately warm to when they experience them (stand by for rustacean “i need time to make tea and my compile times are exact…

>> Made by really famous veteran language designers > Yeah that’s a positive No, that's also a negative. C is close to assembly and produces fast code but it's weakly typed and very unsafe. Pascal was the strongly typed and safe option but people went for C because speed was considered more important than safety back when processors were slow. In today's online world, we've realized safety is more important than spee…

Pascal in DOS was as fast as C if no more.

Re: The Go Programming Language and Environment

#120

Earlier quoted context omitted.

>> Made by really famous veteran language designers > Yeah that’s a positive No, that's also a negative. C is close to assembly and produces fast code but it's weakly typed and very unsafe. Pascal was the strongly typed and safe option but people went for C because speed was considered more important than safety back when processors were slow. In today's online world, we've realized safety is more important than spee…

>> but it's weakly typed and very unsafe Oh here we go :-) and yet the world spins on C kernels and lands jumbo jets in C autopilots and regulates heartbeats with C pacemakers and, and, and … It seems there’s more nuance to this than just “strong types good”. >> people went for C because speed was considered more important than safety But for the past 10-27 years people have the choice to use a fast and safe language…

> fast and safe language (java, C#...)

No, no even close. Java and C# crawled on a Pentium III-IV even with SSE2 compared to C and C++.

If you said Ocaml...

Post reply on HN