Hacker News new | ask | show | jobs
by xorcist 3873 days ago
What other mainstream programming language has a queue pattern built right into the language itself?
2 comments

What is the value of building something like that into the language? Why should a language have a "queue pattern" built into the language itself? Go has to have channels as a primitive to be usable in 2015 because its lack of generally-accepted features makes it impossible to do the same in userland. Same with its lists, same with its maps. I don't need it built into C++ or Scala or Java/Kotlin or C# or D, because these languages aren't unwilling to let me do it myself (but in all cases there are standard libraries to help me do it, even in the cases where it is not expressly already available).

You are implicitly casting as something to be praised one of the greater missteps of Go.

Missteps is a bit harsh, don't you think? Like them or not, channels and goroutines are quite integral to the Go language. And I think it's perfectly clear it's put in on purpose, and that it does guide the design of software written in the language.

You could perhaps compare it to Python, where async functionality has a solid and well established userland implementation in Twisted, but where asyncio still made a big splash around the community. Language constructs matter.

You misunderstand me. There is nothing in Go channels, syntactically or semantically, that is improved by being in the language itself, except insofar as the language does not provide meaningful and useful abstractions to its users to allow them to do it. I don't care why they say they did it, I care that it isn't very good and that I can't effectively replace it because the core developers don't give me the tools to do what is trivial in any other statically-typed language I see in common use. Channels and goroutines exist as core language features because the language is inexpressive because Go fundamentally does not trust end-use programmers to do smart things--so core developers had to do it instead.

"Misstep" was the kindest phrasing I had for the kind of trainwreckish design decisions and institutional reification of developer mediocrity that get you to what you're defending.

Your chosen tools have contempt for you, and it mystifies me as to why you would defend them for their failures.

Scala, Java & C# are all languages I've used professionally that have concurrent queues built into the standard library.