News for hackers. Stuff that matters.
Re:Go hits the concurrency nail on the head by ken on Thursday October 04, 2018 @01:51PM (#18142046)
> I'm happy to go on record claiming that Go is the mainstream language that gets this really right. And it does so by relying on two key principles in its core design...

The unmentioned third principle that it relies on is: "Curly braces, so it looks almost like C if you squint". That's what makes a language "mainstream" these days.

It looks like Go is very good at concurrency, but from everything I've read, I don't see how it's any better than Erlang or Clojure. The only controversial part of Eli's claim is the implication that other languages that get concurrency right aren't "mainstream". That's not a well-defined term and so naturally this is going to irk many people.

Perhaps the title would have been more accurate as "Go hits the concurrency nail on the head, using the hammer of K&R style". :-)

Re:Go hits the concurrency nail on the head by pythonaut_16 on Thursday October 04, 2018 @01:55PM (#18142075)
I don't think Go has better concurrency than Erlang, but go does have generally better raw performance. Ultimately I think both are good languages they just make different trade offs.

If I was designing a command line app I'd probably choose Go, if I was designing a web service I'd probably choose Elixir/Erlang. Of course those can easily flip; there are classes of command line apps where I might choose Elixir/Erlang and there are classes of web services where I might choose Go.

I can't speak to Clojure though.

Re:Go hits the concurrency nail on the head by virmundi on Thursday October 04, 2018 @02:00PM (#18142107)
Go doesn’t need a VM. That’s key. You get good concurrency with an easy to deploy binary that can target the major chips.
Re:Go hits the concurrency nail on the head by ken on Thursday October 04, 2018 @02:27PM (#18142307)
That's a good point. Modern programming languages are all pretty big and complex and whenever someone tries to nail down "this is why it's good/popular" there always seem to be other significant factors that got missed. After all, if it were just one factor that leads to programming language popularity, we could design the Next Big Language by just following that recipe!

In the case of Go, I can imagine many of its attributes are significant:

- Good concurrency model

- Familiar style for imperative C/Algol-family programmers

- Requires no VM

- Backed by major corporation

- Runs on all major OSs

- etc

Actually, I think I'm changing my mind. I'd put "corporate backing" higher on the list. Some languages have gotten a huge boost by being backed by a major corporation (classic example: Objective-C), and I'm having trouble thinking of a general-purpose programming language backed by a major company that did not become popular (Dart would be my best guess but even that seems to be doing alright).

Re:Go hits the concurrency nail on the head by weberc2 on Thursday October 04, 2018 @05:15PM (#18143734)
I like Go because everything is super simple. From dependency management to unit testing to performance profiling to its build/deploy story, everything just works. I don't need to learn a new configuration language and project configuration format and complex dependency management system just to build my project. I don't need to pick a unit test framework and test runner. I don't need to figure out how to wire said framework / test runner into my build tooling. I don't need to figure out how to ship my app along with its dependencies or make sure that my deployment target has the right version of a VM installed. I don't even need to worry about learning a new IDE. I could keep going, but it's things like this that matter to me even more than the language itself.
Re:Go hits the concurrency nail on the head by matt_m on Thursday October 04, 2018 @03:03PM (#18142633)
Go is also statically typed while Erlang/Clojure are dynamically typed. That seems like another pretty significant difference aside from the syntax.
Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @02:39PM (#18142390)
Modula-2 used to fit all those points, except backed by major corporation, unless we consider GM a major corporation.
Re:Go hits the concurrency nail on the head by _ph_ on Thursday October 04, 2018 @03:21PM (#18142825)
I consider Go as a Modula-2 successor. It shares most traits I liked a lot with Modula-2. I prefer the C-style syntax to the more long-winded one though. The familiarity is no surprise though, considering that Robert Griesemer is a student of Wirth.
Re:Go hits the concurrency nail on the head by tralarpa on Thursday October 04, 2018 @03:34PM (#18142958)
Oberon (which is a successor of Modula-2)
Re:Go hits the concurrency nail on the head by _ph_ on Saturday October 06, 2018 @06:23AM (#18154417)
While I used Modula-2 a lot in a long distant past, I unfortunately never got into Oberon, so I didn't consider it in my comment. Though if Go is a successor to Oberon and Oberon is a successor to Modula-2, Go is also a successor to Modula-2 :).
Re:Go hits the concurrency nail on the head by pjmlp on Monday October 08, 2018 @02:39PM (#18170083)
Go's method definitions are copied from Oberon-2 syntax.
Re:Go hits the concurrency nail on the head by kureikain on Thursday October 04, 2018 @03:35PM (#18142972)
> Backed by major corporation

I don't think Go success has anything to do with Google. Google engineers probably favors Java/Python.

I think the key thing to make Go adopt is because the Docker project and Hashi Corp.

The second most important thing is it is super easy to compile Go program and run it and adopt by DevOps teams

Re:Go hits the concurrency nail on the head by tmerr on Thursday October 04, 2018 @11:40PM (#18145576)
Eh? I can't speak for all of Google but I like me some Go. It has a culture of minimalism both in language and code, which makes it easy to pick up and read others' work. I wouldn't recommend it for all problems, but it's at least nice for backend services.

Java is a victim of its own success: it has lived through style evolutions which have lead to fragmentation in the ecosystem. Some code uses mutable datastructures with for loops, others immutable datastructures with the stream API. Some code uses dependency injection, while some doesn't. As a result it takes more time to mentally calibrate to the style when pulling up a .java file. Another imperfection: GC pauses can cause request timeouts and are annoying to debug.

Python's not perfect either: aside from the obvious performance issues, use of the awkward retrofitted type system makes me wonder why a statically typed language isn't being used to begin with. The lack of good static analysis is especially annoying at Google where the tooling is quite good.

Just my 2c

Re:Go hits the concurrency nail on the head by apta on Friday October 05, 2018 @04:28PM (#18151451)
> it has lived through style evolutions

The same can be said for C++, C#, etc. that have been around for a long enough time. Golang is relatively speaking still new. Look back at this again if golang adds generics and other features that will change how code in it is written.

> Another imperfection: GC pauses can cause request timeouts and are annoying to debug.

That's not an issue with Java, but how the GC is tuned. Golang provides only 1 gc that is tuned for latency. And even that is not hard real time. The JVM has several GCs you can choose from, including latency optimized ones.

Re:Go hits the concurrency nail on the head by tmerr on Saturday October 06, 2018 @12:08AM (#18153482)
>Look back at this again if golang adds generics and other features that will change how code in it is written.

Absolutely. I was surprised by the number of proposed changes in Go 2, especially regarding error handling. Curious whether old code will be migrated or left behind.

>That's not an issue with Java, but how the GC is tuned

Good point, I haven't done much GC tweaking personally but that sounds worth learning more about. However I think language might have something to do with it: In Java almost everything is a referenceable object, while in Go one can put values directly inside structs. So Go has less work to do. Without that advantage I doubt it would seem competitive with Java GCs.

Re:Go hits the concurrency nail on the head by apta on Sunday October 07, 2018 @03:26PM (#18162207)
Java will be getting value types in an upcoming version. C# already has value types (called structs). The JVM also does escape analysis to avoid heap allocation when it can.
Re:Go hits the concurrency nail on the head by TheDong on Thursday October 04, 2018 @03:50PM (#18143099)
You're welcome to your opinion.

Anecdotally, I've heard from many people that Go only took off in China because chinese programmers like google and it was sold as a language by google.

> Google engineers probably favors Java/Python

That's irrelevant. The fact of the matter is that Go has a company backing it and providing a constant stream of well-paid developers and infrastructure. Most small languages can barely afford to have two poorly-paid fulltime developers.

I doubt go would exist if there weren't several people getting paid very large quantities of money working on it.

Re:Go hits the concurrency nail on the head by kureikain on Sunday October 07, 2018 @01:52AM (#18159037)
Let's look at it from different angle. When first release, AWS Lambda or even Google Cloud FUnction didn't support Go. NodeJS always get there. Python is there always.

So the point of big company backing it doesn't add much value. Even Google didn't support Go for their Google Cloud Function.

Re:Go hits the concurrency nail on the head by AnimalMuppet on Thursday October 04, 2018 @04:18PM (#18143300)
Major backing can get you publicity, but don't think that's the deciding factor. What really matters is that major backing gets you the resources to produce a really solid, complete standard library. That is a critical component to language success.
Re:Go hits the concurrency nail on the head by floitsch on Saturday October 06, 2018 @08:13AM (#18154733)
Failed programming languages are not popular, which is why it is hard to remember them. For example, Ceylon (backed by Redhat) never got any traction, and most people forgot about it or never heard about it.
Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @02:37PM (#18142376)
Modula-2 did it first in 1978.

With co-routines and static compilation.

Re:Go hits the concurrency nail on the head by dev_dull on Thursday October 04, 2018 @02:19PM (#18142255)
Go made tradeoffs that maybe didn’t make it “better” at concurrency, but it really did make it easier than alternatives.
Re:Go hits the concurrency nail on the head by Groxx on Thursday October 04, 2018 @03:36PM (#18142980)
You can do this with many VM languages too - you package the VM with the code you want to ship. The VM-wrapper still needs to be built for the target arch (like Go), but the code it runs does not (like Go).

I will absolutely agree though that Go makes this easy, which is quite a large benefit. But it's not in any way the opposite of a VM.

Re:Go hits the concurrency nail on the head by nimish on Thursday October 04, 2018 @01:56PM (#18142089)
Yeah, irritatingly. Erlang had this nailed years before. It's a bit too weird syntactically, and doesn't have the full force of Google pushing it, so it gets ignored :(
Re:Go hits the concurrency nail on the head by ngrilly on Thursday October 04, 2018 @03:02PM (#18142622)
True, but Go and Erlang don't occupy the same niche.

Go is imperative, while Erlang is mostly functional.

Go is AOT (ahead-of-time) compiled, while Erlang runs on a VM.

Go is statically typed, while Erlang is dynamically typed (I know about Dializer).

Go concurrency primitives are designed to coordinate goroutines living in the same process, while Erlang concurrency primitives are designed to coordinate Erlang "processes" living in the Erlang VM or even in multiple Erlang VMs forming a cluster.

Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @04:25PM (#18143351)
Erlang is AOT, the vm reads compiled and optimized bytecode.
Re:Go hits the concurrency nail on the head by ngrilly on Thursday October 04, 2018 @05:08PM (#18143688)
You're right. I oversimplified a bit too much.

I should have write: Go produces native binaries, while Erlang runs on a VM.

Re:Go hits the concurrency nail on the head by Sharlin on Thursday October 04, 2018 @04:33PM (#18143414)
The point is that Erlang (like Java etc) needs a runtime, Go doesn't.
Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @04:51PM (#18143556)
Every programming language has a runtime, even Assembly if the CPU is micro-coded.

How do you think that the GC, go-routine scheduler, cgo marshaling get managed?

Re:Go hits the concurrency nail on the head by qznc on Thursday October 04, 2018 @05:07PM (#18143678)
I assume what people want to say is that Go requires nothing which other languages install via the system package manager. While "runtime" is not the correct term, the desire is real.

With Java you first install a JVM. With Python you install the interpreter and batteries. This always leads to version conflicts at some point.

In contrast, with Go your CI builds an executable, you transfer that to your server and it runs. You don't have to care about the version of some "runtime" already on your server.

Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @05:39PM (#18143905)
Using the wrong terms leads to urban myths and misunderstandings.

You don't need to install Java at all, because the JVM can be bundled with the application, and for anyone that actually cares to pay for them, the large majority of commercial Java third party vendors have AOT compilers on their JDKs.

Likewise with Python, there are several solutions how to bundle a set of scripts with an executable.

Re:Go hits the concurrency nail on the head by brianwawok on Thursday October 04, 2018 @05:26PM (#18143819)
And if you deploy with docker then your build server slaps your java Jar and JRE in a docker image and you deploy one thing. No functional difference.
Re:Go hits the concurrency nail on the head by merb on Thursday October 04, 2018 @05:30PM (#18143846)
well to be fair you can do the same in java, python whatever. it is just not as easy as go install/go build. heck in c# you actually only need to have dotnet runtime >= your higehst installed version. basically I think .net core 2.1+ does it better than any other tools, it can be published via `--self-contained --runtime linux-x64` or without. (the runtime is needed since you create a launcher executable)

it's just dotnet publish with the switch or without and you get a folder that you can copy where you need the runtime or where the runtime + start script is inside the folder.

(Java 9+ has something similar but it's way more complicated than just running java publish, etc..)

Re:Go hits the concurrency nail on the head by weberc2 on Thursday October 04, 2018 @05:20PM (#18143776)
I thought it was pretty obvious that the OP was using "runtime" to refer to an external interpreter program. The significance being the simplicity of deployment.
Re:Go hits the concurrency nail on the head by marcosdumay on Thursday October 04, 2018 @08:53PM (#18144871)
I didn't think it was all that obvious, and after I read the OP's answers I thought he was complaining about distributable size, instead of deployment procedures.
Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @05:35PM (#18143882)
That is an interpreter as you very well mention.
Re:Go hits the concurrency nail on the head by weberc2 on Thursday October 04, 2018 @06:04PM (#18144081)
Sometimes things have multiple names :shrug: I really like your contributions; this one seemed unnecessarily pedantic.
Re:Go hits the concurrency nail on the head by pjmlp on Thursday October 04, 2018 @06:07PM (#18144103)
Which any CS book clearly clarifies.
Re:Go hits the concurrency nail on the head by weberc2 on Thursday October 04, 2018 @02:43PM (#18142433)
> full force of Google pushing it

This trope is getting old. Variations include "Go is only popular because Google spends millions marketing it!". There is a small team at Google that work on the language along with the open source community. I'm pretty sure none of Google's marketing team works to promote the language, and I'm sure that its success is much less important to Google than Erlang's success was to Ericcson. I don't know very much about Ericcson, but it wouldn't surprise me to find out they spent many times the amount on Erlang that Google spends on Go.

There are probably lots of reasons why Go is successful, but I'm positive that it has more to do with simplicity, learning curve, tooling, ecosystem, etc than it does with corporate sponsorship or marketing.

Re:Go hits the concurrency nail on the head by fulafel on Thursday October 04, 2018 @02:53PM (#18142526)
Ericsson abandoned Erlang, or Erlang abandoned Ericsson, depending on how you look: Ericsson banned it internally, and shortly afterwards when the Erlang team managed to get it open sourced, they resigned from Ericsson and founded their own Erlang company.

(source: http://webcem01.cem.itesm.mx:8005/erlang/cd/downloads/hopl_e...)

Re:Go hits the concurrency nail on the head by chrchang523 on Friday October 05, 2018 @03:46PM (#18151128)
Armstrong was rehired by Ericsson in 2004 [1], and a team at Ericsson maintains the language today (see e.g. [2]).

1: http://erlang.org/pipermail/erlang-questions/2006-July/02136... 2: http://blog.erlang.org/

Re:Go hits the concurrency nail on the head by geodel on Thursday October 04, 2018 @03:01PM (#18142605)
So does Ericsson still use Erlang in their recent network hardware etc?
Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @04:30PM (#18143388)
I recall hearing no, somewhere. I am under the understanding, (don't know where from) that Cisco DOES use Erlang in their stack, and there is a group of people at VMware that does.
Re:Go hits the concurrency nail on the head by geodel on Thursday October 04, 2018 @06:48PM (#18144370)
Thanks. This is something where simple internet search yields nothing much. Possibly because these network switches are proprietary platforms and they do not publish how internals are implemented.
Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @10:08PM (#18145203)
Re:Go hits the concurrency nail on the head by di4na on Thursday October 04, 2018 @08:18PM (#18144723)
Yes. After a few years of ban, Ericsson changed gears. The recent head of tech at Ericsson look at that past as a real miss. All Ericsson 3G switch/router are in Erlang.

Ericsson has a small team maintaining erlang and they are the steward of Erlang.

Re:Go hits the concurrency nail on the head by digitalzombie on Thursday October 04, 2018 @10:43PM (#18145344)
> This trope is getting old. Variations include "Go is only popular because Google spends millions marketing it!".

I chose Angular.js because of google actually. And then Google did me dirty with Angular 2.

Corporate sponsorship is actually a huge driving for my decision and many company too.

Having a big company is a good indicator of success and it says that that programming language will have a stable contributors. Google also are using Go so they also have a stable programmers within the ecosystem.

Getting developers to adopt a tech and be in it is hard. Google have bunch of their dev in it and which increase the chances of these dev will present and talk in meetup to evangelicalize others.

Re:Go hits the concurrency nail on the head by geodel on Thursday October 04, 2018 @02:58PM (#18142582)
Very true. Go has proven big success outside Google.

So many people here argue here that Go is not good enough else why Google keep using other languages even now. But same people argue in Apple/Swift case "of course Apple need not rewrite all perfectly working applications in Swift". But somehow Google has to do to prove language is fine.

Re:Go hits the concurrency nail on the head by TheDong on Thursday October 04, 2018 @03:58PM (#18143157)
> There is a small team at Google that work on the language

How many languages are lucky enough to have paid developers working on them?

Many languages have been labours of love with 1 developer getting paid, at best, pennies or doing it on the side.

I think there's a reasonable middle ground where you can claim "Go made good choices, but it also wouldn't exist as it does nor be as popular without google throwing money at its developers and without the brand association"

For example, the D programming language was wonderfully made and had many great features, but it never got all that far, in part because "Built by Mars" isn't as good as "Built by Google".

Sure, Go didn't just win by default because google was there (Dart is a good proof that Google doesn't instantly make languages succeed), but I'm certain having their backing and name association sure didn't hurt.

Re:Go hits the concurrency nail on the head by gatestone on Friday October 05, 2018 @06:19AM (#18146979)
If Pike, Thompson, Cox et al. had stayed at Bell Labs, they would have created Go there as salaried researchers? Or because no one would have forced them to do C++, they maybe would not have bothered... ;-)
Re:Go hits the concurrency nail on the head by Scarbutt on Thursday October 04, 2018 @03:20PM (#18142813)
Who do you think pays for almost all of Go's development?
Re:Go hits the concurrency nail on the head by pdeuchler on Thursday October 04, 2018 @04:42PM (#18143487)
I don't think most of this is true... the Go core team is at least 20ish people, and that's just engineers not PMs, Managers, or other support staff. Plus the tools and kubernetes/gcloud teams. It's also kind of disingenuous to call any team lead by Rob Pike and Ken Thompson "small"... yeah they might not have hundreds of people but they can certainly wield a hell of a lot of influence.

Google also spends quite a decent amount promoting Go and donating to OSS that promotes Go.

You're not wrong about the comparison to Ericcson/Erlang though, or most of the reasons for Go's success, but you can't discount the Google factor.

Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @04:27PM (#18143364)
Anecdotally, there are at least three people at work who say that "go is used at google so it will be around forever and I can be sure there will be support for it".
Re:Go hits the concurrency nail on the head by Sharlin on Thursday October 04, 2018 @04:34PM (#18143423)
I'm sure somebody said the same thing about GWT too.
Re:Go hits the concurrency nail on the head by sofaofthedamned on Friday October 12, 2018 @10:39AM (#18201721)
I actually really loved GWT and it was a shame it withered and died.
Re:Go hits the concurrency nail on the head by AnimalMuppet on Thursday October 04, 2018 @04:38PM (#18143454)
Tooling and ecosystem: Yes, but how much did Google spend on developing the tooling and ecosystem? Forget the marketing - libraries, tooling, and ecosystem are where corporate support pays off for a language.
Re:Go hits the concurrency nail on the head by fossuser on Thursday October 04, 2018 @02:07PM (#18142173)
I think syntax actually matters a lot more then people tend to give credit for in a language's success. I suspect this is why functional languages have struggled to became very popular while languages with C like syntax have added some functional features instead.

The learning curve for imperative programming structure just seems easier for people to understand and work with.

Re:Go hits the concurrency nail on the head by ken on Thursday October 04, 2018 @02:54PM (#18142538)
Syntax is a crucial component of any programming language.

I would disagree, though, that there's anything inherently easier about imperative languages. Could it not be that it's simply more familiar to people today? People don't (IME) learn to program in school. They learn by futzing around with whatever free thing is on their computer. In the 1980's we had BASIC, and today we have JavaScript, and Python/Ruby/Java/C# also seem to be popular. At this point, imperative programming is winning because of path dependence. Nobody ends up using Erlang by accident.

Once you get to concurrency, functional languages are clearly punching above their weight. I find it impressive that Go makes imperative programming work well here, but it still looks a bit old-fashioned to me.

Is Go leading the pack by having a great concurrency model, yet with an imperative language that runs on bare metal? Or is it trying to hold back the tide, when almost the entire rest of the industry is solving concurrency by moving to functional languages running on a portable VM? I don't know.

Re:Go hits the concurrency nail on the head by fossuser on Thursday October 04, 2018 @04:36PM (#18143434)
It's hard to disambiguate familiarity, but I'd suggest that imperative languages are more similar to spoken/written human language, particularly english.

I'd suspect if you gave someone who didn't know lisp or java a simple program and had them try and explain what it was doing they'd have more luck with understanding the java syntax.

Re:Go hits the concurrency nail on the head by erikpukinskis on Thursday October 04, 2018 @05:37PM (#18143893)
It seems like you’re saying the primitives don’t matter at all?

I see three major programming styles: imperative, declarative, and functional.

Declarative seems extremely popular these days (see Rails, CSS, Webpack, etc). My guess is it’s because it’s fairly obvious how to design a declarative API. You just think about what you’d want as an application programmer, write that down in English, and then target that with your implementation.

These interfaces are totally unstable, and so they just degrade with time but they’re so easy to stand up they dominate the field.

Imperative interfaces are a bit harder because you need to explicitly pass all of your data through every call. This is laborious at first and you have to do lots of refactoring of the interface as you implement it. API developers generally don’t like this feeling, and would rather have a stable interface to target and only futz with the internals. And it takes longer and requires more pondering when you can’t just reach directly into arbitrary parts of your code base and do whatever TF you want. And since APIs are usually released before they stabilize, application developers also don’t like seeing their interfaces move.

Functional APIs are like the imperative ones but even moreso. Not only do you have to pass around data explicitly all the time, you have to model every intermediate state in your data explicitly too.

This is even more constrictive, which just makes all of the above even worse.

Personally, I think this pain pays off in the end, and I code in a purely imperative style deep in a haunted wood. The suffering over moving interfaces eventually leads to a stable interface that’s actually well thought out and composeable. Code can become “finished” whereas declarative code almost always just rots til it’s replaced.

But in terms of “Don’t make me think” which is most pro developers dominant mode of working, there is a clear declarative > imperative > functional hierarchy.

In theory a purely imperative or purely functional ecosystem could gain a kind of network effect of good code that would eventually outweigh the work slowdown.... your application code would be harder to write, but you’d be writing on top of a richer, more composeable library base.

However we don’t seem to observe this in practice.

My theory is that imperative and especially functional languages tend to attract masochists, who get yakshorn into radical experiments into purism, trying to bend every aspect of an ecosystem into a perfect Q-dimensional prism. This leads to just less effort in churning out pragmatic tools. And it also leads to a kind of dazzling conversation around the languages that turns away people who are just trying to get something done.

With sustained effort these effects could be overcome. Over time I am building a library of pure imperative JavaScript modules. They seem to be reaching “finished” one by one. We’ll see.

Re:Go hits the concurrency nail on the head by niftich on Thursday October 04, 2018 @02:31PM (#18142329)
The impact of syntax is really undervalued. Syntax matters because many people are exposed to new languages through familiarity with other languages, as opposed to cramming a guide in isolation. And since programming languages are for humans, the cognitive load of understanding through reading and expressing through writing depends on one's ability to map the concepts to the code and vice versa.

This is easier when similar languages look and -- through the power of abstraction, appear to -- work in similar ways. Go benefits from looking similar to the wider C family, while Erlang suffers from a syntactic heritage that never achieved as much prominence. The prevalence of languages in the syntactic style of C allows people unfamiliar with Go to be able to glean a lot of what's going on, and develop their understanding of Go-specific features gradually.

Re:Go hits the concurrency nail on the head by int_19h on Friday October 05, 2018 @08:09PM (#18152730)
My simple smell test for language syntax readability is whether you can write a conditional statement with a multiline condition in it, without it looking ugly, and with the condition being clearly separate from the body. For example, in Lua or Ruby:

   if
      something()
      or other()
   then
      do_whatever()
   end
It's very easy to read; your eye doesn't "stumble" anywhere it doesn't have a reason to. In C (and Java, C# etc), on the other hand:

   if (something() 
         || other()) {
      do_whatever()
   }
This makes for some confusing indentation, and now it's hard to distinguish what's condition and what's body! Sometimes people indent the entire condition to make it clearer:

   if (  something() 
         || other()) {
      do_whatever()
   }
but now you have holes in the middle which draw attention to that spot for no good reason. Or you can put ){ on a separate line:

   if (
      something() 
      || other()
   ) {
      do_whatever()
   }
but so much punctuation hanging by itself is still an eyesore. And Python is hardly better:

   if (
      something()
      or other()
   ):
      do_whatever()
Go doesn't need the () in condition, so it's slightly more tolerable if you do that (but go fmt will object):

   if
      something() 
      || other()
   {
      do_whatever()
   }
But I'll take the Lua/Ruby syntax any day of the week.

That's just one example. In retrospect, I think that C-style syntax was a bad idea in general, and adopting it as the "default syntax" across a large part of the industry was a monumental mistake. It favored compactness and speed of writing over readability and clarity. I really wish something like Modula or Ada would become the syntactic basis of modern languages today. I'd rather spend a few more keystrokes typing out things like "var" and "end", but end up with code that reads smoothly in a code review, or when debugging some ancient codebase.

Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @04:29PM (#18143379)
Anecdotally, it was really difficult for me to convince myself to learn SQL specifically due to the syntax and the fact that unlike the imperative languages I normally use it was declarative.
Re:Go hits the concurrency nail on the head by cube2222 on Thursday October 04, 2018 @02:17PM (#18142236)
I don't agree. It's just that the familiar is easier. If you first teach someone programming with haskell, they'll have the same hard time switching to C.
Re:Go hits the concurrency nail on the head by marcosdumay on Thursday October 04, 2018 @09:00PM (#18144910)
Every time I see people saying stuff like that I remember of this:

http://james-iry.blogspot.com/2009/05/brief-incomplete-and-m...

> His lambda calculus is ignored because it is insufficiently C-like. This criticism occurs in spite of the fact that C has not yet been invented.

Anyway, it's not because C-like languages are any easier. It's just that nearly all programmers learn to code in a C-like language. Most of them won't ever learn a second language, the number that will do the work of learning something actually different is minuscule.

Re:Go hits the concurrency nail on the head by another-cuppa on Thursday October 04, 2018 @02:22PM (#18142273)
Yeah, but is it because people actually like the syntax? Some languages seem to be attractive to people right from the start, like Python. Some take a while to grow on you but then you realise their brilliance and don't want anything else, like Lisp. C isn't either of those.
Re:Go hits the concurrency nail on the head by renox on Friday October 05, 2018 @06:05PM (#18152117)
Really? Python's syntax looks clean at first OK then later I realized that it has no variable declaration (and old memories of time lost in BASIC due to spelling errors start coming back), no static typing, is slow and isn't particularly multicore friendly .. uhm how about using Go instead? (No I don't know Go but I'm quite sure I can learn it without too much difficulties)
Re:Go hits the concurrency nail on the head by AnimalMuppet on Thursday October 04, 2018 @04:36PM (#18143440)
I don't know about that. I grokked C's syntax immediately, just from reading K&R, without actually having a compiler to try anything on. It just made sense to me.

I suspect (but cannot prove) that certain languages and/or programming styles make more sense for certain people, and others do so for other people. (There also is almost certainly some bias toward familiarity.)

Re:Go hits the concurrency nail on the head by dummyfunnytoo on Thursday October 04, 2018 @04:31PM (#18143396)
FWIW, I've disliked the look of Python from the first time I saw it and loved Lisp-like syntax immediately. Can agree on C though.
Re:Go hits the concurrency nail on the head by presscast on Thursday October 04, 2018 @04:55PM (#18143582)
It's also not simple... at all.
Re:Go hits the concurrency nail on the head by the_clarence on Thursday October 04, 2018 @01:52PM (#18142054)
You’re mentioning functional languages. That’s not for everyone or every usecase. (I love Erlang.)
Re:Go hits the concurrency nail on the head by ken on Thursday October 04, 2018 @02:09PM (#18142185)
So, in the world of concurrency, are imperative languages good for every person and every use case? :-)

My intention was not to single out functional languages. Those were just the first languages I thought of with the best concurrency support.

(I don't think it's mere coincidence, though, that so many concurrency-aware languages are functional. If concurrency is a major concern, perhaps one should consider that "mainstream" or even "imperative" might not necessarily be a hard requirement.)

How about Occam or Crystal, then, which use CSP and are imperative yet don't have curly braces?

Re:Go hits the concurrency nail on the head by AnimalMuppet on Thursday October 04, 2018 @04:46PM (#18143522)
> So, in the world of concurrency, are imperative languages good for every person and every use case? :-)

Clearly, no.

I think it comes down to the question of shared mutable state. Functional languages say "don't do that, it's evil" - with some justification. If the problem doesn't push you toward shared mutable state, then consider functional languages.

When could the problem push you toward shared mutable state? I worked on a video router. You had maybe 100 video sources, maybe 80 video destinations, and six different sources of control. All six sources of control needed to see the same state of what inputs were connected to what outputs. So the fundamental nature of the problem was one giant shared mutable state.

Re:Go hits the concurrency nail on the head by XorNot on Thursday October 04, 2018 @07:11PM (#18144477)
Where this shows up a lot is the types of business problems which functional programming finds itself in. The least surprising thing in the world is that Haskell and functional Scala work pretty okay for Hadoop ETL work, for example.
Re:Go hits the concurrency nail on the head by marcosdumay on Thursday October 04, 2018 @09:09PM (#18144946)
Neither is concurrency. But if you need concurrency, functional is very visibly the way to go.
Re:Go hits the concurrency nail on the head by dnautics on Thursday October 04, 2018 @10:12PM (#18145227)
Definitely agree. For work I built a highly concurrent job scheduler in 3 months from zero in elixir, and being confident about the internals due to its functional nature let me focus on smoothening the interface edges