News for hackers. Stuff that matters.
Re:Go + Services = One Goliath Project by catalogia on Saturday December 21, 2019 @06:40PM (#21854007)
Go seems to be optimized for onboarding new developers (particularly straight out of school) quickly, rather than for the long term comfort of developers using it. There are Rob Pike quotes that speak to the first part of that at least.

If I was a business owner, I'd love Go. But what I can't really figure out is why so many devs love it. It's far from the worst thing in the world, I don't hate it, but I just can't get excited over it either.

Re:Go + Services = One Goliath Project by dx87 on Saturday December 21, 2019 @06:52PM (#21854073)
From what I can tell by reading what Go developers write, they like it precisely because it's not something to get excited over. It seems like the kind of language where once you learn it, you don't have to keep up with a bunch of blog posts detailing all the cool new things being added to it, and decisions over stuff like formatting are made for you. I primarily use Rust for hobby projects, and the steady stream of new features/libraries can get tiring. You don't have to use the new stuff in your own code, but if you want to use popular libraries, you'll probably be stuck using the new features. Making everything async seems to be the new hotness, and sometimes I wish the language would be nothing to get excited over.
Re:Go + Services = One Goliath Project by stoicShell on Saturday December 21, 2019 @07:35PM (#21854285)
100% agreed, and you made me realize something.

As someone who writes — I mean prose, whether fiction or not (mostly not: essays, technical, etc) — I had to come to terms quite early with the dichotomy you explain here.

There is a place for the "beautiful language", the parts of it and the ways of using it that make it a pleasure, as a writer and as a reader. This, unsurprisingly, usually demands a whole lot of additional work on top of the 'direct meaning'.

Then there's a place, in casual communication, in business, in marketing, in essays as well, in technical docs, in speeches, in a lot of places, for the 'direct meaning', or close to that. The efficient use of language, when all form recedes in favor of meaning, of concepts, of getting that 'other' to get what you mean.

It's just that, in human language, you do it all with the same tools, we use formal or topical subsets of a vastly larger ensemble. In programming, we're more likely to use different languages [themselves subsets of human language if you think about it, but let's forget that for the sake of simplicity].

And there are programmers among us who love to dabble in the form, like some writers would spend 10%, twice, ten times the effort crafting just "better form" over an already well-defined idea/story. While other programmers, or at other times, just focus on getting things done. Cue the spectrum in-between.

So it all depends what we put in our code, as programmers, as human beings I guess. Is that thing a personal statement? Or is it just garbage code to temporarily expedite some roadblock? How do we approach complexity, bottom-up from the simplest elements/code, or top-down with the most expressive almost-meta entities? Maybe some side-line out-of-the-box angle? See how we'd word all of these, in human languages, as in code. We just wouldn't say the same, nor code (select languages) the same.

I don't know if I explained it well. But looking at it from a human language writer, it all seems clear now. The whole rat race of languages, the churches, the sheer effort put into form when meaning has already been solved 10 times by others, the strong NIH syndromes... it's all so common in traditional writers circles. We're all just writers, really!

Re:Go + Services = One Goliath Project by catalogia on Saturday December 21, 2019 @09:03PM (#21854653)
I think there can exist a happy middleground between constant churn and what Go currently provides. Some nice quality of life features like pattern matching and list comprehensions would go a long way towards making it a more pleasant language, without making developers feel like they're in a constant struggle to stay current.
Re:Go + Services = One Goliath Project by SomaticPirate on Saturday December 21, 2019 @07:52PM (#21854372)
It also lends itself to patterns in code. One thing that learned about Python coming from Perl was there was a “Pythonic” solution. Go seems to take that idea further with gofmt and a small but powerful std lib. I can typically glance at how someone is configuring their http.Server and understand the intention of the code.
Re:Go + Services = One Goliath Project by idoubtit on Saturday December 21, 2019 @08:29PM (#21854519)
The "pythonic" way was a mantra that has been obsolete for a long time. With Python, there are many (unsatisfying) ways to declare dependencies, many ways to format code (I hope "black" will prevail), many ways to format a string, many ways to create a struct/record...

The lack of quality batteries included also leads to "there is more than one way to do it" through the choice of unofficial libraries. My experience is that the extensive standard library of Go brings more normalisation.

Re:Go + Services = One Goliath Project by nordsieck on Saturday December 21, 2019 @06:58PM (#21854110)
> But what I can't really figure out is why so many devs love it.

I think, in order to understand why so many people love Go, you first need to understand why so many people love C.

Go is C with most of the warts removed (for application development). GC, easy strings, maps, easier first-class function syntax, code formatting, modern standard library, easy concurrency, etc.

Yes, there are plenty of places that C can go that Go cannot - operating systems and embedded devices are high up on that list. But for back end application development, it's great as long as your application is of a moderate size and you don't need specialized data structures.

That covers quite a bit of ground.

Re:Go + Services = One Goliath Project by _ph_ on Sunday December 22, 2019 @05:50AM (#21856424)
I have so much to agree. There is a reason, why still a lot of software is implemented in C. There are historic reasons of course, but also, because C is just powerful enough to do so, and that gives you a small language, which removes a lot of complexity. Of course, in the case of C, this comes along with the warts of lacking memory safety and limited type safety, which are responsible for a lot of bugs. Other languages like Pascal and Modula-2 did improve a lot in these respects. Yet, all of those languages remain simple.

That is the reason, I like Go so much. It is still a very simple language, but improves in the key parts of memory safety, having a GC, better type checking, and a few high level constructs, most of all having first class functions and closures. These enable many of the features of "higher" programming languages. You can do mapping functions over lists in Go quite fine.

Re:Go + Services = One Goliath Project by firethief on Saturday December 21, 2019 @08:16PM (#21854454)
> GC, easy strings, maps, easier first-class function syntax, code formatting, modern standard library, easy concurrency, etc.

So what part of C is not in the list of warts averted in Go?

Re:Go + Services = One Goliath Project by jlokier on Saturday December 21, 2019 @08:24PM (#21854493)
> So what part of C is not in the list of warts averted in Go?

A simple language with only a few things to learn. Everything built up from those few things.

Re:Go + Services = One Goliath Project by firethief on Sunday December 22, 2019 @05:09PM (#21859989)
Huh. "A simple X" is a wily phrase, because everything is exceedingly "simple" in the aspect its designer had in mind[1], but complex from other perspectives. C may be simple in terms of how you would describe it building on the interface provided by a typical CPU, but to someone who only knows Scheme or Haskell learning the machine model is no small task--I don't think the 683-page length of the C11 specification can be attributed to its authors being long-winded. I don't really see Go as having inherited C's simplicity-in-terms-of-differences-from-a-machine-model. If they were optimizing for the same kind of "simplicity" that C has, they'd have to be out of their minds to add garbage collection, strings, maps, lambdas, and goroutines. Go, like Scheme, Haskell, and python, is a different "simple" from C.

1: unless designed by a committee with no such single-minded aim

Re:Go + Services = One Goliath Project by adtac on Saturday December 21, 2019 @06:51PM (#21854067)
Defers, channels, inexpensive goroutines, a mostly consistent standard library, very good performance, garbage collection, being similar to C, strongly typed, and readability are the reasons why I've enjoyed writing Go exclusively for the past couple of years. Almost none of these is exclusive to Go, but the intersection of all these certainly is.
Re:Go + Services = One Goliath Project by wbl on Saturday December 21, 2019 @08:34PM (#21854538)
You might want to try Ocaml.
Re:Go + Services = One Goliath Project by marcosdumay on Saturday December 21, 2019 @06:59PM (#21854111)
There's a class of problems (servers running a simple protocol) for what a basic type system, convenient green threads, and a lot of optmizations are all that you need for great results.

For those Go would beat anything that lacks convenient green threads (Type Script included, also Java, C#, C++), anything that is dynamically typed, and anything that is interpreted.

Re:Go + Services = One Goliath Project by gsempe on Saturday December 21, 2019 @08:10PM (#21854436)
Go is mainly loved by devs who love to build products over to write beautiful code. Go is for product builders who use coding as a mean and not an end.
Re:Go + Services = One Goliath Project by nemo1618 on Saturday December 21, 2019 @09:05PM (#21854661)
Most of the "means vs. end" dichotomy occurs at a level above choice of language. Every language permits both beautiful code and ugly code. Every language allows you to optimize. I write Go every day and I strive to write beautiful and performant code, for the sake of writing beautiful and performant code. Go may not allow you express e.g. quicksort as beautifully as in Haskell, but its simplicity and pragmatism lend themselves to a different kind of beauty.
Re:Go + Services = One Goliath Project by bootlooped on Saturday December 21, 2019 @07:45PM (#21854340)
I find the tooling to be very attractive, especially since modules came out. go test, go mod, go vendor, etc... Working in the Go ecosystem is mostly pleasant and easy.
Re:Go + Services = One Goliath Project by lonelappde on Saturday December 21, 2019 @08:59PM (#21854640)
There are two kinds of devs: Devs who mainly like the feeling of wll writing code, and devs who mainly like building products. Go is by the latter for the latter.

It's bit meant to be exciting, it's meant to be effective, efficient, and reliable.

Re:Go + Services = One Goliath Project by FpUser on Saturday December 21, 2019 @07:09PM (#21854175)
The performance of Go is not particularly impressive. Especially when it is used to write busy servers with many simultaneous requests. And as a language it is not inspiring either.

Not sure why business owners should love it either. Not enough features in the language coding productivity suffer in a long run. Also if the developer needs Go because other languages are "too complex" maybe said developer can't produce proper code anyways.

Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @07:32PM (#21854274)
Complex languages don’t result in better programs. Else we would see Scala and C++ everywhere instead of them being relegated to narrow niches.
Re:Go + Services = One Goliath Project by antielectronite on Saturday December 21, 2019 @07:43PM (#21854328)
C++ is not a narrow niche. We do see it pretty much everywhere and it continues to be the most used language for systems programming, games, embedded systems, and pretty much anything else where performance is critical.
Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @08:06PM (#21854421)
That is a niche, because most applications are IO bound and not compute bound. What even qualifies as “systems programming” is ill defined. Far more critical business systems run on Java and C# servers than C++. If there are C++ components they tend to be small parts along the critical path and not the primary implementation language.
Re:Go + Services = One Goliath Project by FpUser on Saturday December 21, 2019 @08:27PM (#21854510)
"most applications are IO bound" - there is a whole world of not IO bound software running on cars, toasters, airplanes, desktops, hospital equipment etc etc. I do not think it is any smaller then that niche of web spaghetti being churned out by undergrads
Re:Go + Services = One Goliath Project by antielectronite on Saturday December 21, 2019 @08:25PM (#21854499)
I disagree with the notion that most applications are IO bound only. This is something people often say uncritically, but in my experience is false. Just using a non-native Electron or even Java application feels very sluggish and when you look at the Waterfall on slow web pages, what's slowing it down is very often unrelated to "I/O".

Secondly, C/C++ is like the third or fourth most commonly listed programming language in job listings. If you think all but 2 or 3 languages are niche, that is not what the word means.

Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @09:02PM (#21854650)
C/C++ is not a language. I am also someone who has use C and C++ for years as part of my work and have mostly moved on to TypeScript because there isn’t much reason to use C or C++ anymore unless you are in one of those niches where you need to still program at that level.

Most software problems are not about solving them faster, it’s about combining existing components in new ways and figuring out to orchestrate it all.

I don’t care about copy elision, heap fragmentation, perfect forwarding, when my performance is being lost in the communication between services. What I need is a better architecture and more scaling, not concerning myself with if this loop is being vectorized, or that object is being moved instead of copied, and other minutia which inevitably ends up wasting your time when writing C++.

Re:Go + Services = One Goliath Project by antielectronite on Saturday December 21, 2019 @09:33PM (#21854771)
I don't necessarily disagree that not everything needs to be optimized for performance, but I would just argue that the use cases for Typescript are far more niche than the use cases for C++. There's more to software than just web stuff
Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @09:42PM (#21854811)
Most stuff is web stuff now. And I’m not talking about front end, we do a lot of back end work in TypeScript because node is lighter than the JVM which makes it a better choice for lambdas. I’d say it also has more sophisticated static typing than Java or C++, while also allowing dynamic typing in the few cases where it is convenient. Having the front and back end written in the same language also reduces impedance between teams. A lot of our tooling is even written in it now, deprecating many Ruby scripts.
Re:Go + Services = One Goliath Project by antielectronite on Saturday December 21, 2019 @09:56PM (#21854860)
Most stuff is not web now. There is software in everything everywhere not just web sites.

Niche does not mean "stuff I don't personally use at my job", but that is the only definition under which Typecript is not niche and c++ is. C++ in 2019 had the 4th most job listings according to Indeed. Calling that a niche is absurd especially in comparison to Typescript.

Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @10:34PM (#21855006)
The thing about C++ is that you need to recruit specifically for C++ programmers in a way that you don’t need to recruit for programmers in many other languages. The barrier of entry for C++ is high enough that you can’t just take your typical developer and ask them to write good C++, it’s a language which requires far more effort to become competent in.

There are also many places which just ask for Java/C++ experience for no apparent reason. Amazon is like this, all of their job listings mention C++ but only a very small percentage of the code base is in C++. There is at least 10 times as much Ruby code and it is part of systems that most engineers will have to work with, but no job application mentions that.

Re:Go + Services = One Goliath Project by FpUser on Saturday December 21, 2019 @08:18PM (#21854465)
You know, there are things in between. As for being niche - not sure bout Scala as I have zero experience with it, C++ however is anything but.
Re:Go + Services = One Goliath Project by baot on Saturday December 21, 2019 @07:41PM (#21854320)
c++ is in narrow niches?!
Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @07:46PM (#21854348)
Java killed it for general purpose use in the 90s. It’s never your first option unless you are in areas like games, graphics, some embedded work, or quantitative trading.
Re:Go + Services = One Goliath Project by pnako on Saturday December 21, 2019 @10:18PM (#21854948)
"All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?"
Re:Go + Services = One Goliath Project by WoodTree on Saturday December 21, 2019 @10:52PM (#21855064)
The Romans or the Chinese?
Re:Go + Services = One Goliath Project by pnako on Sunday December 22, 2019 @04:22AM (#21856120)
For reference this is just a silly quote from Monty Python's Life of Brain.
Re:Go + Services = One Goliath Project by lonelappde on Saturday December 21, 2019 @09:02PM (#21854646)
Please send an email to Rob Like explaining to him how he's not mentally capable of producing proper code.