Designed by Ken Thompson and Rob Pike

>designed by Ken Thompson and Rob Pike
>free and open source
>much of the shit that plagues older languages like type declarations just werks in Go while still being statically typed
>rapidly gaining popularity and support
Give me one GOOD reason you hate Go. Being made by Google doesn't matter because it's a fucking language and won't have a botnet.

Other urls found in this thread:

nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
git-scm.com/docs/git-submodule
en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Design_concepts
twitter.com/NSFWRedditImage

lol no generics
Also nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/

Go bashing thread? Go bashing thread!

> no statement terminators

>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.
Damn...

The managed to pick the worst error handling mechanism out there.
Or, right, they didn't pick it, they just keep it from C.

...

he's not wrong. millennials are garbage tier at everything.

That quote sounds like Plan 9 though.

>keep it from C
no, C is:
>returning int and taking pointer as argument
>cutting int range in half for error
>returning NULL pointer
>setting errno global variable
>setting field of struct
>taking pointer to pointer to string to return error string

I'm glad for a simple error handling pattern in Go

It's the same except for the lack of explicit pointers.

It's more like lua error handling desu

>shit that plagues older languages like type declarations

It's the same shit, it's just a sugar for a pointer argument for an error value. You still have to write error handling in every other line, and there's no way to automatically interrupt the control flow once an error arises. It's too easy to ignore the error and keep going despite it.

>wasting time writing "int", "string" or "float" when it's obvious what it is when you assign it
While you're typing that shit out, I'm already writing the next line. Go keeps up with my thinking. Writing unnecessary verbose code in other languages prevents that. I am providing far more profit and value to the company I work for too.

> Go keeps up with my thinking. Writing unnecessary verbose code in other languages prevents that.
if err != nil {}
if err != nil {}
...
if err != nil {}
if err != nil {}

About the same number of characters as try catch blocks and regular exception handling methinks.

> Go keeps up with my thinking. Writing unnecessary verbose code in other languages prevents that.

GO confirmed for toddler tier language.
But this is actually a big problem, because the people pushing new software onto the market usually have no clue what they're doing. Take a look at electron. It's a fucking mess.

> if block every other line
> catch block once several functions
uthinks wrong.

>string
dude what even is a string. stop.

Dumb meme. Rust error handling would be exactly the same if it wasn't for their crappy macro system.

if err {}
>is not allowed
Who the fuck thought this was a good idea

As someone who writes a lot of python, not explicitly stating a type leads to a lot of bugs. I have to constantly specify type in my code and i honestly with it was just enforced to begin with.

1. Not it wouldn't be. Rust error handling is based on ADT, so it's impossible to use a result of a function without checking it for errors first.
2. It's called the ? operator and it has nothing to do with macros anymore.
3. "it would be exactly the same if not for X" is a dumb argument, because, well, that's the point of having X.

Go is still statically typed. It just implicitly knows x is an int if you assign 1 to it.

So what makes one a good programmer "capable of understanding a brilliant language"?
And what's a brilliant language in the first place? Lisp?

Any language with generics.

Lisp is academic trash that nobody uses in the real world because it's only useful for learning how to do factorial or Fibonacci functions.

C is a brilliant language. Useful and powerful yet simplistic in its design

Until you go to debug and forget to indent, space or backspace. Code is also impossible to read on large projects because all your statements are aligned left. So your if is indented but all your fucking else statements are left. Fucking brutal but it's OK you have to defend the fact that you blow at programming.

That's the complete opposite of static type

It's not though. That feature is merely type inference. Static typing means that a variable is only one type and cannot be reassigned as a different type, such as is the case for dynamic typing.

>designed by Rob "I don't want physical storage near me, put everything on da klaud goyim" Kike
This is not a positive point kid.

Come back once you've passed CS 101, retard.

Sometimes, especially in numerical programming you don't want 1, or any other integer to be an integer but rather a float.

Learn how literals work then.

auto typeInt = 1;
auto typeUint = 1UL;
auto typeLong = 1L;
auto typeFloat = 1f;
auto alsoFloat = 1.0;

>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

That quote always bugs me, even if it's coming from a key Go language designer. Go as it DID turn out is now simply "the saner C the way it should be in current-decade, if you don't mind having a fast GC built-in that you can still fine-tune or selectively turn off, an exhaustive stdlib and rich ecosystem, very fine tooling, super-comfy concurrency & parallelism primitives, lack of #MACROs, grokkable predictable safe pointers". Anything higher-level, go Rust/Functional/OOP/scripting/whatever. Anything lower-level, might as well do ASM. Go totally *isn't* an "idiots language", StackOverflow / simple or Java/C#-Enterprisey-Pajeet-Framework at all. Don't get hung up on whatever RP says, *ever* --- is probably the only applicable advice here. Go really does require you to fire up your brain and Get To Work. IMHO.

Then you can explicitly set it as a float.

Why do redditors try and criticize things they haven't even used without even doing a simple search?

I programmed and learned many languages for about a decade now from very low level to FP, the only language that I really hate and feel disgust towards it is Golang

what you're describing is strong/weak typing

As usual the unemployed geniuses of Sup Forums have spoken and Go is clearly designed by idiots and only the unemployed geniuses of Sup Forums know how to design a new programming language. Just look at the fine work that the unemployed geniuses of Sup Forums ha--

No, I'm not you mongoloid. Weak/strong typing is something else.

This is weakly typed JS:
a = "2"
b = 2;
c = a - b; // will interpret this as 2 - 2 and evaluate to 0


This is strongly typed Python
a = "2"
b = 2
c = a + b # this is an error because a and b are incompatible types


Seriously, just stop posting already.

>Sup Forums doesn't even know the difference between static and dynamic typing
What went wrong?

It all went downhill after desktop threads were banned.

loss

dutifully employed at Wendy's as a crew employee for going on four years now. neck yourself.

Why does this thread exist? Go back to your containment thread.

>millenials
You mean H1Bs?

I don't see anything wrong in that picture except the excentric shirt and glasses.

>wasting time
Fuck off. No programmer is slowed down by typing stuff.
>when it's obvious what it is when you assign it
The problem is, it is not obvious.
When you read through a strangers project, determining how the data is structured is an easy way to figuring out how the system works.

>Give me one GOOD reason you hate Go
Lack of reliable dependencies management

C is good for systems and very low-level programming. At everything else, it's even worse than Go.

what is git or mercurial?

>git or mercurial
>dependencies management

git-scm.com/docs/git-submodule

Of course, and i do. But getting into the habbit of not declaring type is fucking stupid to begin with. When you do run into bugs it's usually a pain to figure it out.

>git submodules
>dependencies management
Wew, apparently everything is even worse than I thought.

>not explicitly stating a type leads to a lot of bugs
If you're using an inferior dynamic language like Python then probably. Who cares about runtime errors when you can just recover from them to a known correct state? Erlang and Common Lisp are examples of dynamic languages done right.

It kinda sucks when the code your running takes 2-3 hours to run.

Pikeyboy came to reddit to argue with me because I kept calling it a meme language and he just wouldn't accept that

>int x = 1;
is better than
>var x int = 1;

>designed by Ken Thompson and Rob Pike

That's a huge negative.

> dynamic typing done right

Out of curiosity, which language satisfies your needs regarding dependency management?

Literally created to allow mediocre programmers to churn out homogeneous code in a corporate environment. It's been successful in that context, and I guess it's better than Java, which traditionally filled that role, but I have no idea why people get hyped about something so gimped, shill for it, use it for hobby projects, etc.

b-but muh nine nines

>Being made by Google doesn't matter because it's a fucking language and won't have a botnet.

Didn't microsoft compile C++ code with a botnet that they got exposed for and had to remove?

Rust, Ruby, Java, PHP, Common Lisp, Haskell, Clojure, Erlang, Elixir, Dart, Kotlin, Scala and basically every other modern language have somewhat acceptable solutions for dependency management.

Pulling from head of the master branch of some Git repo is fucking retarded and anyone that thinks otherwise should not be writing software.

Git repos have versioning and you can pull by version/tag. Dependency managers do literally that.

Go currently can't pull by version/tag without using a third party tool. It pulls head from master. Even the two retards that made Go have finally realized that they need better package management (dep).

>Plan 9 is a distributed operating system, designed to make a network of heterogeneous and geographically separated computers function as a single system.

en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Design_concepts

That's also exactly why they half assed their C++ coding standard to forbid legitimate practices such as operator overloading.

>Give me one GOOD reason you hate Go. Being made by Google doesn't matter because it's a fucking language and won't have a botnet.
There are people who are this dumb.

yes you are

Go feels very much like programming Java 1.0

It has almost all of the same features Java initially touted, like a GC to avoid manual memory management headaches, a simple but effective static type system, and a strong focus on enterprise.

Programming in Go also feels a lot like programming in Java 1.0, except instead of passing around Object and using reflection to see if it's actually the type you expect, you pass around Interface{} and use reflection to see if it's actually the type you expect.

But Go also has none of the robust tooling that enterprise devs have come to expect with programming in Java, and none of the stability that businesses expect from an enterprise-oriented language like Java 1.5+.

Ultimately I think that literally the only thing Go has going for it is being able to build fat native binaries. But now that Java 9 has that...what does Go really offer? "It's exactly like an outdated version of Java, but at least it's not called Java"?

>won't have a botnet
Wasn't there something in the runtime that was sending analytics or something to Google? I remember hearing something like this a few years ago.

The Go compiler looks for certain keywords and patterns and if it find them uploads the source code to Google for inspection.

No Pajeets.

why would I use genericless Go when I can use Kotlin, which is vastly superior anyway?

>It's exactly like an outdated version of Java, but at least it's not called Java

For many people, that's enough. Java is old, and old has the connotation of being bad. Other than the age, most of the complaints about Java are equally if not more applicable to Go, but Go is new and therefore good.

When Java requires you to be extremely verbose in your code, to explicitly define and state what you want and expect - it's seen as a tedious headache of a bygone era.

When Go requires you to be extremely verbose in your code, to explicitly define and state what you want and expect, it's seen as a bold return to simplicity and is helping reduce errors and make code more maintainable.

Pike and Thompson are honorary Pajeets.

>fun
Into the trash it goes.

It could've been worse. They could have used 'def'.

>no fun allowed

I heavily advocate Kotlin, but let's not pretend like it doesn't have issues now and that the community isn't forcing Jetbrains to build in issues into 1.2 and 1.3. Collection literals, anyone?

Yes, that's mainly a problem with using a closed source compiler though.

I get the impression that it was more of a clumsy attempt to make a statically typed python with native performance.

Java for all intensive purposes has native performance.

>very low-level programming
>C is good
>what is assembly
Because at very-low-level™ performance isn't an issue right?

I see what (You) did there.

> No generics
> A map type that is generic because it gets to be special because it's part of the standard library
Both of these seriously rub me up the wrong way, no thanks.

>implying you can out optimize the compiler for anything non-trivial
You can't. Stop pretending.

Kek. Gets me every time.

Don't hate Go, but GOPATH is fucking annoying.

no generics lol

>Collection literals

I think there's room for nuance in a discussion about them.

For example, I'm not sure that:

List stringList = { "A", "B", "C" }


would be an improvement over

val stringList = listOf("A", "B", "C")


But when you start talking about things like matrices and two dimensional arrays, Kotlin starts to make things really difficult.

int[][] intMatrix = [ [1, 2, 3], [1, 2, 3], [1, 2, 3]]


vs.

val intMatrix = Array(3, { Array(3, { i}))


The latter is just awful. There's room for improvement here.

>Give me one GOOD reason you hate Go.
curly braces are dogshit and only served a purpose because of slow terminals
readability is awful

their better than {if,for,while,..}..end tho

literally \n you nog

I think he implies whitespace indentation

no, they are not
if (something) then
//do stuff
end if

is glorious