News for hackers. Stuff that matters.
Re:I Do Not Like Go by tinco on Friday December 21, 2018 @05:38AM (#18732535)
Oh come on. People are forced to use Javascript, I don't think it would even exist today if it wasn't the only crossbrowser language.

Almost no one is forced to use Go, and yet people flock to it. I don't feel I need to state the things that make Go good because it's already been done a thousand times, and everyone in this thread already knows why it is good.

Have you ever built something in Go? I'm almost as productive in Go as I am in Ruby, and that was within a week of learning it. It's crazy good for a language that lacks so much expression.

Re:I Do Not Like Go by ernst_klim on Friday December 21, 2018 @11:35AM (#18734394)
>People are forced to use Javascript

People are not forced to use Javascript since there are a dozen of great LangName->Js infrastructures.

People are not forced to use PHP or other badly designed languages as well.

I wouldn't call Go a bad language due to the subjectivity of the term, I would rather call it ad-hoc language, which is basically a DSL sufficient for some domain, but not very suitable for a general engineering.

Go is a compiled PHP, its rather weak type system and oversimplified nature are suitable and sufficient for webdev for the economical reason. Building something complex in Go is possible but painful, Go doesn't help here but rather impedes making you write your own dynamic type system and other facilities to compensate the language's deficiencies.

Re:I Do Not Like Go by skohan on Friday December 21, 2018 @06:05AM (#18732640)
To be fair, I feel like go's simplicity makes it easy to get small things up and running, but the pain comes when your project starts getting large. That's when additional abstractions are missed.
Re:I Do Not Like Go by tinco on Friday December 21, 2018 @08:42AM (#18733221)
I don't think Go should be used for larger projects. Apparently though the community disagrees because they're really adding generics.
Re:I Do Not Like Go by stephenbez on Friday December 21, 2018 @02:53PM (#18736043)
It's interesting, I feel like it's the opposite and Go excels at large projects. Compared to other languages, Go doesn't let you use as many abstractions, so writing code takes longer, but it is much more straightforward to read.

I work at a >1000 person company that codes mostly in Scala, and some in Go, and would prefer to read unknown Go code any day. With the Scala I run into things like implicit parameters and 7 layer of inheritance, but the Go code is straightforward.

Go is somewhat of a lowest common denominator language. You could out perform it with a small team of strong developers, but when once your project gets to a certain size, it's unlikely all of the developers will be strong.

Re:I Do Not Like Go by jungler on Friday December 21, 2018 @05:54PM (#18737434)
I think it's philosophically interesting. The Go approach to needing a more powerful language is to assume that you actually want to write a custom code generator for your project's needs. And it's not pretty to do so(the "go generate" thing makes quite a wart in its attempt to ease this process), but it works, and you can move on with your project. Most newer languages get tied in knots trying to generalize that same task and have a kind of configurability meltdown where everyone does it differently, so while it can be shared and reused in theory, none of it is actually compatible. I think it's akin to criticism of OOP in that in a lot of cases, "you wanted a banana but you got a banana plantation, three tractors, and twenty employees".

And Go is just a little bit closer to the sweet spot than C was, since a greater proportion of Go code seems to successfully avoid extensive preprocessing.

On the other hand, it might be a bit too restrictive for prototyping to have these power limits. I definitely have an easier time feeling my way through an unknown data modelling problem if I can start slinging things together dynamically.

Re:I Do Not Like Go by tinco on Friday December 21, 2018 @04:14PM (#18736705)
That is an interesting point, and even if that is true, it still means adding generics would be a detriment.

I do wonder if that's an inherent property of languages with a more expressive type system. Many would blame it on OOP, but I think Haskell also suffers from it. Haskell that is written without using typeclasses is much more readable than Haskell that's written more plainly, at least to me.

It might be a unique property to Go, which other language is strongly typed yet with such a basic typesystem, lacking inheritance or even generics?

Re:I Do Not Like Go by johnwyles on Saturday December 22, 2018 @10:56AM (#18741046)
I will echo this too. I think Go has helped usher in the sensible concept BDD and of microservices to the forefront and the do one thing do it well approach. Versus monolithic applications instead you have a lot of digestible standalone services comprising the overall application and Go excels in this.
Re:I Do Not Like Go by sjellis on Saturday December 22, 2018 @05:37AM (#18740003)
> I don't think Go should be used for larger projects. Apparently though the community disagrees because they're really adding generics.

Go is actually specifically built for large projects: the project was started because C++ has severe problems when used at the scale of Google.

The basic design of Go was intended to engineer out the issues that Google developers saw when using C++ at scale for long periods, such as circular references and problems with combining exceptions with concurrency.

What makes Go distinctive is that the team concluded that complexity inherantly does not scale, and designed for simplicity. Which enables Go to scale down in a way, even though it was originally intended as a "systems language".

Re:I Do Not Like Go by etse on Saturday December 22, 2018 @12:44PM (#18741569)
Hasn't the community long since disagreed by evidence of Docker and Kubernetes?
Re:I Do Not Like Go by tinco on Saturday December 22, 2018 @01:42PM (#18741847)
Do Docker and Kubernetes have bad codebases? I didn't know that. I thought Kubernetes was one of the top contributed to projects on GitHub.
Re:I Do Not Like Go by ernst_klim on Sunday December 23, 2018 @05:21AM (#18745375)
>Do Docker and Kubernetes have bad codebases?

Kubernetes people had literally reinvented a dynamic language on top of Go, that says something.

https://medium.com/@arschles/go-experience-report-generics-i...

Re:I Do Not Like Go by cmlndz on Friday December 21, 2018 @08:47PM (#18738357)
If usage is a measure of ‘goodness’ (whatever that is), then PHP must be the best programming language the world has ever seen. And we know it’s not.
Re:I Do Not Like Go by YeGoblynQueenne on Friday December 21, 2018 @07:01AM (#18732831)
>> Almost no one is forced to use Go, and yet people flock to it.

Well, at some point people "flocked" to javascript, and they weren't forced to. So it's a good language, then? Or sub javascript for java, or your favourite bashable language.

Re:I Do Not Like Go by hollerith on Friday December 21, 2018 @09:28AM (#18733468)
I will assume you're referring to Node. The browser explains why many coders know Javascript well; the fact that many coders know Javascript well explains the popularity of Node --without our having to resort to the hypothesis that Javascript is a good language.
Re:I Do Not Like Go by YeGoblynQueenne on Friday December 21, 2018 @06:30PM (#18737660)
I'm referring to the adoption of javascript as the scripting language for browsers. Why else do "many coders know javascript well"?
Re:I Do Not Like Go by kazinator on Saturday December 22, 2018 @01:28AM (#18739299)
The story of how we got Javascript in browsers has absolutely nothing to do with "adoption".
Re:I Do Not Like Go by YeGoblynQueenne on Saturday December 22, 2018 @05:06AM (#18739936)
But there wasn't anything stopping early browsers from using a different scripting language. They stuck with javascript. Was that because it was a good language?

And what about Java, for example? And why don't people "flock" to LISP, say, or Haskell? Are those "bad" languages, now? And what about software, like windows- is windows widely used because it's a great operating system?

Adoption is a rotten bad measure of quality. Not just in programming languages- in everything.

Re:I Do Not Like Go by kazinator on Saturday December 22, 2018 @04:56PM (#18742676)
> But there wasn't anything stopping early browsers from using a different scripting language.

You mean "nothing stopping the other browser, Microsoft Internet Explorer, from adopting Netscape's Javascript too".

Re:I Do Not Like Go by YeGoblynQueenne on Sunday December 23, 2018 @10:12AM (#18746471)
Well yes. Don't the other browser vendors count as adopters?
Re:I Do Not Like Go by em-bee on Sunday December 23, 2018 @09:56AM (#18746381)
agreed. after i learned common lisp and smalltalk, i realized that since there has hardly been any innovation in programming since the first languages half a century ago.
Re:I Do Not Like Go by kazinator on Saturday December 22, 2018 @01:27AM (#18739296)
Indeed, you can program the browser in whatever you want, yet they insist on using JS.
Re:I Do Not Like Go by edem on Monday December 24, 2018 @09:38AM (#18752299)
Plot twist: people never "flocked" to Javascript. People use Node for example because the company they are working for thought that it would be nice, efficient and less costly to have one language for the whole platform. They mostly learned their lesson since then and moved on to real languages which can be used on the backend.