News for hackers. Stuff that matters.
Re:Experience Report: 6 months of Go by slimsag on Saturday April 30, 2022 @02:26PM (#31218054)
so.. Haskell and Scala? Those would be the top two that come to mind for me when someone says "highly 'logical' and 'compose well'", "having sum types", 'more expressive', etc.

I've heard they're great languages (haven't used them much myself), but I probably wouldn't choose them for say an early-stage startup. Go's value is in being a mundane, repetitive, boring language. It makes it easy for any random kid to dive into an existing code base and become productive, that can be super valuable.

There's a theoretical gradient of programming languages where one side is "has a single expression for exactly your problem, a single unique expression you've never heard of exists to solve every possible problem" and the other is "requires thousands of expressions to express your problem, but only a thousand are available" - or something like that.

My point? There's no perfect language, yet people are always trying to find one. It's OK if you don't like Go and prefer another language, the real devil / tradeoff is in the fact that conformance to a single language (or set of languages) is such a strong social phenomena. I think that's why people end up so angry with viewed-as-subpar languages like Go gaining so much traction: it limits personal choice of which language to work in.

I'm positive linguists aren't happy with English becoming the global language either, but you've gotta admit - having a global language is valuable.

Re:Experience Report: 6 months of Go by uncomputation on Saturday April 30, 2022 @04:36PM (#31219077)
> I'm positive linguists aren't happy with English becoming the global language either

Nit: Linguists do not hold prescriptive opinions about the "quality" of languages. They analyze languages to form descriptive theories about the structures and features of certain languages. I only nitpick this because, while having a lingua franca is certainly valuable and there is nothing "bad" about English any more than literally any other language, the closest thing to this in programming "languages"/notations is actually C, not Go. It's hard to overstate the invisible influence on C on basically every mainstream language and how we think of programming and computers in general.

An interesting analogue to your example of English is the varying efforts to transliterate most languages into using the Latin alphabet, much like how many programming languages today need/greatly benefit from a compatibility layer with a C compiler/the C standard library.

Re:Experience Report: 6 months of Go by typesanitizer on Saturday April 30, 2022 @04:25PM (#31218979)
> There's no perfect language, yet people are always trying to find one. It's OK if you don't like Go and prefer another language, the real devil / tradeoff is in the fact that conformance to a single language (or set of languages) is such a strong social phenomena. I think that's why people end up so angry with viewed-as-subpar languages like Go gaining so much traction

I hope my post didn't come across this way. To be clear, I think Rust and Swift (as two examples that I mention multiple times) have a lot of problems (slow compilation being a very big one), and are by no means perfect. I'm not angry at Go's popularity as much as wanting improvements to the developer experience.

Re:Experience Report: 6 months of Go by karmakaze on Saturday April 30, 2022 @02:51PM (#31218245)
An F# program can be about as mundane as a similar Go program, only concise.
Re:Experience Report: 6 months of Go by throwaway894345 on Saturday April 30, 2022 @04:00PM (#31218786)
This is like the C++ argument that you should just use C++ because it has almost every feature so you can just use the ones you want and ignore the others. Of course, in practice you still have to deal with colleagues and upstream packages that use features you don’t like. Same deal with F#—you could write F# in a Go-like style, but you’ll be swimming against the current. And the only advantage is a little less verbosity, which really isn’t anyone’s bottleneck—people over-index on minimizing localized boilerplate and ignore the costs of gratuitous abstraction.
Re:Experience Report: 6 months of Go by karmakaze on Saturday April 30, 2022 @08:00PM (#31220723)
Type-inference is a zero-cost 'abstraction' and any place you choose can make explicit narrowing of them. The libraries I needed to make a web application didn't have any mind-bending patterns, but rather did the most obvious things with the basic language features.
Re:Experience Report: 6 months of Go by Thaxll on Saturday April 30, 2022 @02:51PM (#31218244)
Scala and Haskell are pretty much "dead" language, I worked with Scala in the past, it was impossible to find poeple willing to work with it so everything was re-written in Java.
Re:Experience Report: 6 months of Go by Milner08 on Saturday April 30, 2022 @02:57PM (#31218294)
Im not sure its fair to call Scala dead. Its still pretty widely used, at least in companies in London. Hiring is a bit more competitive but we still get some great Scala devs interviewing for the more senior roles.

Disclaimer - I work with Scala every day, so am definitely highly biased.

Re:Experience Report: 6 months of Go by icedchai on Saturday April 30, 2022 @05:09PM (#31219392)
I worked at a Scala shop about 10 years ago. Everyone had their own preferred "dialect", kind of like C++, resulting in too much whining and complaining during code reviews. IMHO, the language is too complex. Also, the compiler was slow, and the IDE support was plain awful (Eclipse was especially bad, IntelliJ was better.) Keep in mind this was over a decade now, so I'm sure things have improved.
Re:Experience Report: 6 months of Go by mjr00 on Saturday April 30, 2022 @06:11PM (#31219897)
This was my experience as well. I worked at a place that used Scala primarily in the "better Java" style and enjoyed the language a lot. I moved to a different company and the lead programmer there was a functional purist who insisted on putting scalaz/cats into everything and using Scala as Haskell lite, despite it really not being appropriate for the use case. It really soured me on the language.
Re:Experience Report: 6 months of Go by vips7L on Saturday April 30, 2022 @06:26PM (#31220043)
There’s no bigger productivity killer than scalac and sbt.
Re:Experience Report: 6 months of Go by herbstein on Sunday May 01, 2022 @12:44PM (#31226458)
I work in a Scala shop with 500k lines of Scala. We're moving to a Bazel-based development workflow because SBT is a slog and doesn't handle incremental compilation well at all.
Re:Experience Report: 6 months of Go by icedchai on Saturday April 30, 2022 @07:46PM (#31220619)
Is it still that way? I've thought about taking another look at it for personal projects.
Re:Experience Report: 6 months of Go by vips7L on Monday May 02, 2022 @01:09PM (#31237870)
By the time the sbt shell starts I swear to god maven would have my project fully packaged.
Re:Experience Report: 6 months of Go by dboreham on Saturday April 30, 2022 @11:43PM (#31222001)
Not parent but yes it is.
Re:Experience Report: 6 months of Go by halfmatthalfcat on Saturday April 30, 2022 @03:33PM (#31218580)
Scala is definitely not dead. Sounds like a recruiting failure than anything about the language itself.
Re:Experience Report: 6 months of Go by erik_seaberg on Saturday April 30, 2022 @06:36PM (#31220120)
I learned Scala a while ago on the job, and I’m grateful for that opportunity. Nobody on your team volunteered?
Re:Experience Report: 6 months of Go by therealdrag0 on Sunday May 01, 2022 @04:10PM (#31228227)
Lol. Why would people be unwilling to work in Scala. I moved from Java to Scala and it was a breath of fresh air. We’ve had no trouble hiring people who didn’t know Scala but learned it on the job. It’s not rocket science.
Re:Experience Report: 6 months of Go by kaba0 on Sunday May 01, 2022 @07:15AM (#31224030)
Scala just got a new version, which fixes plenty of shortcomings. It also has an option to exclude the null value from the language, so I wouldn’t call it dead by any mean of the word.

It is also running splendidly at plenty of companies.

Re:Experience Report: 6 months of Go by pjmlp on Saturday April 30, 2022 @03:08PM (#31218377)
I bet plenty of universities will keep using them beyond our lifetimes.

From that point of view they are doing quite well.

Re:Experience Report: 6 months of Go by blakebreeder on Saturday April 30, 2022 @03:27PM (#31218524)
you can also take a Latin course in college. how "well" is Latin doing?
Re:Experience Report: 6 months of Go by pjmlp on Saturday April 30, 2022 @03:30PM (#31218553)
Good, it is still the official language in Vatican documents, has an updated dictionary, and some European countries see it as a CV requirement by most HR departments when hiring for top management positions.
Re:Experience Report: 6 months of Go by cinntaile on Saturday April 30, 2022 @03:35PM (#31218591)
> some European countries see it as a CV requirement by most HR departments when hiring for top management positions.

This sounds utterly bizarre, I have a very hard time believing this. Which countries would that be?

Re:Experience Report: 6 months of Go by MereInterest on Saturday April 30, 2022 @03:51PM (#31218722)
I can't confirm the specific example, but this sounds like a smoke cover for nepotism and/or classism. If you're not allowed to recruit solely from your personal friend group, requiring that applicants be able to speak a dead language let's you select that same group of people while giving a flimsy justification.
Re:Experience Report: 6 months of Go by tptacek on Saturday April 30, 2022 @04:19PM (#31218929)
So, just like strong idiosyncratic preferences for particular programming languages.
Re:Experience Report: 6 months of Go by pjmlp on Saturday April 30, 2022 @05:03PM (#31219345)
In France for example, it used to be that all good family kids studied Latin, so high league universities and was seen as plus on the CV, at least for 20 years when I used to live there.
Re:Experience Report: 6 months of Go by BrandoElFollito on Sunday May 01, 2022 @06:00PM (#31229127)
France would be a typical example, except that this is an urban legend.

Context: I graduated from the 3rd best high school in France, then from one of the Grandes Ecoles (~ Ivy League). I was born in the early 70's in Versailles.

German and Latin were seen as languages where the best students meet. This was a vision of the parents without getting in the reality. The best high-school students were everywhere.

I had Latin and Greek in mid-school and high school like anybody else. Complete loss of time when you are not interested.

At university it did not matter at all.

Today, when recruiting even for the "really French" companies nobody would think about Latin as a discriminant. It literally wouldn't cross anyone's mind.

There are urban legends everywhere, this is one about French education (which is sometimes great, and sometimes completely backwards to the point where I doubt the decisions makers have ever seen kids in real life)

As for today (and not 40 years ago), in the class of my son in that same elitist high school, one student does Latin and Greek. Because he is interested in the languages.

Re:Experience Report: 6 months of Go by throwaway894345 on Saturday April 30, 2022 @04:02PM (#31218796)
That’s pretty good for a dead language, but not so much for a living one to the OP’s point.
Re:Experience Report: 6 months of Go by astrange on Sunday May 01, 2022 @02:07AM (#31222617)
> so.. Haskell and Scala? Those would be the top two that come to mind for me when someone says "highly 'logical' and 'compose well'", "having sum types", 'more expressive', etc.

I don't think Haskell composes that well; monads don't combine well (not that I could do better) since you can only stick them together in an ordered way, the lazy evaluation makes it complicated to see how your program will run by reading the code, and so on.

Btw, "sum types" means enums; it's not actually a super-complicated Haskell only feature.

Re:Experience Report: 6 months of Go by kaba0 on Sunday May 01, 2022 @05:17AM (#31223408)
Do you write imperative programs that execute statements — out of order? Ordering is precisely the point of monads, since they are monoids as well.

And sum types are most definitely not enums, though Rust’s enums do use a bit strange terminology here.

Re:Experience Report: 6 months of Go by astrange on Sunday May 01, 2022 @06:09PM (#31229191)
> Do you write imperative programs that execute statements — out of order? Ordering is precisely the point of monads, since they are monoids as well.

Sure do. After all, your superscalar CPU executes things out of order, and C is a pure functional language in the memory monad.

http://conal.net/blog/posts/the-c-language-is-purely-functio...

> And sum types are most definitely not enums, though Rust’s enums do use a bit strange terminology here.

Swift's enums too. But sure, in C it's an enum with a union at the end.

Re:Experience Report: 6 months of Go by kaba0 on Monday May 02, 2022 @02:03AM (#31231883)
Well, being pedantic, sure almost every modern CPU uses OOE. But they must do so with the huge caveat that from the outside it should be equivalent to executing it in serial (notwithstanding CPU vulnerabilities). But this is an implementation detail only, we could just as well use an older CPU design.
Re:Experience Report: 6 months of Go by halfmatthalfcat on Saturday April 30, 2022 @02:42PM (#31218174)
Having written a lot of Scala, I generally agree until you can form a team that knows what they're doing or has a background in Scala. After that, Scala shines as the codebase(s) scale.
Re:Experience Report: 6 months of Go by ttfkam on Saturday April 30, 2022 @03:47PM (#31218693)
Substitute Scala for any other programming language and the statement still holds.

Experienced developers and those with specific language expertise excel when implementing in that language.

Who would have expected that? /s

Re:Experience Report: 6 months of Go by halfmatthalfcat on Saturday April 30, 2022 @03:51PM (#31218721)
The point is the barrier to entry for Scala is higher but once you have a skilled team working in Scala, you probably get more velocity than others due to the language ergonomics.
Re:Experience Report: 6 months of Go by sidlls on Sunday May 01, 2022 @12:36AM (#31222224)
I don't think there are any (many?) studies on this subject. Much less that confirm this particular bias you've shown.
Re:Experience Report: 6 months of Go by erik_seaberg on Saturday April 30, 2022 @06:32PM (#31220096)
> mundane, repetitive, boring language

These apply just as well to assembly, yet they are the reasons almost nobody tries to use it.

Re:Experience Report: 6 months of Go by nu11ptr on Saturday April 30, 2022 @02:55PM (#31218275)
> so.. Haskell and Scala? Those would be the top two that come to mind for me when someone says "highly 'logical' and 'compose well'", "having sum types", 'more expressive', etc.

I wrote Scala for years - it might be a bit too complicated but overall pretty decent, but I hear good things about Scala 3. I think the ML's, of which it takes inspiration from, are probably a better match. OCaml (EDIT: or F# as another comment mentioned) for instance is a pretty nice balance.

Haskell is very nice and I think qualifies except that it is pretty hard core purely functional with no punches pulled (unlike ML), so is foreign enough for most people not to be deemed a candidate.

I like Rust probably best atm as it is "imperative but with a functional flair", but doesn't qualify as easy I don't think, but is definitely highly logical and composes very well (even if obviously not finished yet).

> I've heard they're great languages (haven't used them much myself), but I probably wouldn't choose them for say an early-stage startup. Go's value is in being a mundane, repetitive, boring language. It makes it easy for any random kid to dive into an existing code base and become productive, that can be super valuable.

I would probably agree on the novice programmer and picking up Go quickly which is arguably the prime feature of Go. I just question the quality of that code, and honestly, don't feel Go is nearly as easy as touted. It is simple for sure, but not always easy. I always had to look up simple things like those magic comment compiler directives and is that interface{} param a pointer or a pointer to a pointer? I just remember the lack of expressiveness actually causing real world confusion (for me at least).

> There's a gradient of programming languages where one side is "has a single expression for exactly your problem, a single unique expression you've never heard of exists to solve every possible problem" and the other is "requires thousands of expressions to express your problem, but only a thousand are available" - or something like that.

While true, I would argue we have found a small amount of constructs that fit well 80% of the time, and is demonstrability better than half the constructs that fit well 40% of the time. Trying to solve every problem with a new construct is not worth it, but nor is the opposite extreme IMO.

> My point? There's no perfect language, yet people are always trying to find one. It's OK if you don't like Go and prefer another language. A real devil / tradeoff is the prohibition of using languages that do not conform with past (company) choices.

Honestly not sure we've found the ideal language yet, and agree there is subjectivity and trade offs at about every turn. In fact, the only thing I'm certain of is that Go missed what I would look for in just about every category except a few (but I agree it is easy to learn, but does it matter if you can't write good code with it?). That said, very intelligent and respected people disagree with me, so to each their own.

Re:Experience Report: 6 months of Go by leshow on Saturday April 30, 2022 @03:52PM (#31218725)
> I like Rust probably... (even if obviously not finished yet).

what? what languages fit your definition of finished?

Re:Experience Report: 6 months of Go by onei on Saturday April 30, 2022 @04:03PM (#31218807)
My disappointment with Rust, that in no way diminishes how much I enjoy using it in my own time, is that I have a hard time recommending it for microservices, which are arguably an average project at an average company. The ecosystem just doesn't feel as fleshed out or complete as in Go. It's a shame because there's libraries in Rust that I adore like clap, serde, and diesel but when I last wanted to write something that integrates with AWS, I found a deprecated unofficial crate and a non-production-ready official crate from AWS.

I don't know whether to attribute this disappointment to the breadth of what Rust can be used for and the difficulty in doing all of them well, or a lack of wider/corporate buy-in for these use cases. It's a pity, because after getting past the initial learning curve I struggle to find anything wrong with the language itself.

Re:Experience Report: 6 months of Go by sjellis on Sunday May 01, 2022 @02:19AM (#31222676)
FWIW, AWS now have an official SDK for Rust in beta:

https://aws.amazon.com/sdk-for-rust/

There are people at Microsoft working on a Rust SDK for Azure, but it's explicitly a volunteer effort with no support guarantees at the moment:

https://github.com/Azure/azure-sdk-for-rust

These days I probably would not look at any language that did not have SDKs for AWS and Azure, for similar reasons.

Re:Experience Report: 6 months of Go by cpeterso on Saturday April 30, 2022 @06:23PM (#31220011)
What tools or libraries is Rust missing for building microservices?
Re:Experience Report: 6 months of Go by maleldil on Saturday April 30, 2022 @11:13PM (#31221845)
They already mentioned AWS support was poor, which I can't confirm. I can say that GCP support is subpar. Comparing Python's GCP library with Rust's is a world of difference.
Re:Experience Report: 6 months of Go by foolfoolz on Saturday April 30, 2022 @02:56PM (#31218283)
> It makes it easy for any random kid to dive into an existing code base and become productive, that can be super valuable

professional developers are rarely “kids”