No classes

>no classes
>no inheritance
>no constructors
>no annotations
>no generics
>no exceptions
>fixed sized arrays

Is Golang just a huge troll by Google? whats the deal here?

Attached: download.png (600x600, 69K)

Other urls found in this thread:

tour.golang.org
golang-book.com
tour.golang.org/concurrency/11
github.com/golang/go/wiki/Projects
github.com/golang/go/wiki/SuccessStories
golangprojects.com
tour.golang.org/moretypes/7
twitter.com/SFWRedditImages

>>fixed sized arrays
what did you mean by this?

you too can pretend to be a googler while using a java 1.0 tier language

I think they just put out a low-effort MVP and then said "yeah, that's enough, lol" and stopped focusing on anything that's not the garbage collector

sounds great

No classes/inheritance/exceptions aren't even necessarily bad; but the fact that they actively discourage or even disallow the use of the funtional paradigm just makes it C with a garbage collector and cheap concurrency.

Sounds like a languague were you get shit done rather than thinking about how smart you can make yourself look.

No wonder it's userbase among actual professionals is growing fast as hell, meanwhile academia is hating it, no surprise there.

>no classes
>no inheritance
>no constructors
these are fine, the problem is that they didn't replace them with anything

Closures and interfaces take you most of the way. Remaining issues include
>terrible error handling system
>very limited type system
>still has null in $current_year
>autistic compiler
>manual looping over and over

so it's c without out of bounds memory buffer overruns

Yeah, just like JavaScript!

>whats the deal here?
Hipsters.

You define an array size on creation and cannot change it later

Yes you can are you actually retarded?

is gccgo usable or is go doomed to shit ffi

I take it as you never using Go and just wanting to complain about something

>no women
>no minorities

It's literally a language between C (1973) and Java (1995).
The only oddity is that it was invented in 2009 (it's design is actually fairly close to Algol-68, which predates C).

Obviously both C++ and Java developers laughed heartily in the face of Go, but if it can get Ruby and Python developers to use a better, faster, statically-typed language, then why not.

Attached: lang.png (1000x1000, 135K)

I'm not OP but yes, that is true. Using append() reallocates, you know.

and you suggest to somehow have growing array without reallocation?

So like literally any other language?

>(it's design is actually fairly close to Algol-68
Nowhere near, Go is much less expressive. ALGOL68 was the best thing until SML. Which means it's still better than every "pragmatic" language in the industry now.

The actual state of Jow Forums.

How the fuck can you not understand one of the most simple data structures created? Is this the influence of pooscript?

Half of those issues are related to Golang not being a Object Oriented language. And that's a good thing, if everyone who's working on the codebase knows what they are doing.

Error handling is the only issue I can see there, but it's going to be fixed on Go 2.0

I’ve been using Flask for setting up web apps during development due to it’s ease of use and quickness.

Looking to switch to Go for the concurrency and scalability, is there a job future with this language?

>Defending no generics

sounds like a dream desu

seething

The Go Team is interested in generics, but don't want to rush it and implement something that might bite their ass later on, backwards compatibility is one of the highest priorities

>fixed sized arrays
The meaning of the array is that it has a fixed size.
If the array can be resized, then this is not an array.

The go2 draft for generics looks pretty retarded, I have no idea why they're pursuing this whole contracts mechanism when Go already has a way of describing what operations a type supports.

Jesus fucking Crist
I share a board with people like you.

Go vs Rust?

now balance the negative aspects of Go against its positive aspects, and then tell us what you think about the language.

I heard they accept proposals, so... patches are welcome, I guess.

completely different domains, I don't know why you'd even compare them

take the Go tour and/or read the book, Go is easy to learn:
tour.golang.org
golang-book.com
then follow the many articles the Go team has published to learn more: tour.golang.org/concurrency/11

>is there a job future with this language?
projects that use Go:
github.com/golang/go/wiki/Projects

here are some success stories:
github.com/golang/go/wiki/SuccessStories

and some job ads: golangprojects.com

for how poorly designed the language is, the runtime is surprisingly well engineered
too bad the language is slow as shit

that's what an array is you python baby.

this 1000x

>too bad the language is slow as shit
No it's not, it does very well against other garbage collected languages like Java and C#, and of course miles faster than Python which is what a lot of people are migrating from.

Wrong. You'd think that with all the compromises Go would be closer to machine level and be comparable to C or Rust, but the Go performance is actually very close to Java.
Well, at least Go can produce small binary files.

>backwards compatibility is one of the highest priorities
so it's Java generics all over again and it'll be shit.

Go is quite on-par with Java and C#. I consider both to be slow.

>no classes
there's struct, and you can write methods to any type
>no inheritance
composition > inheritance
>no constructors
you can easily write a newXXX function
>annotations
absolutely disgusting
>no generics
personally i don't like but will be addressed in Go 2
>no exceptions
a good thing
>fixed sized arrays
see: slice

I hate on Go too often. To acknowledge one successful feature: bound checking on arrays.
To compare it to C++'s vector: [] operator on vector does not do any bound checks, .at() method always does the bound checks.
Go has a middle ground: their compiler tries to verify which accesses are always guaranteed to be in-bounds and only does the bound check on those which aren't.
And ofc there is the obsolete C with pointer and size as separate variables. Such automated analysis and instrumentation is just not possible if the compiler doesn't have the association that the integer is supposed to be length of array.

That's a standard optimization that literally every language does.

It's very cute i love go but i never write it i just look at the mascot

Attached: D1yRSXlUYAAtjiT (2).jpg (1110x960, 127K)

Attached: D1yRSXlVAAAsX3K.jpg (1110x960, 99K)

it looks like you two are both braindead! pick up any low level language and implement a basic container such as a vector. you'll notice you can allocate extra, and have this thing called a growth rate to prevent frequent reallocation.

it's this easy:
struct vector { size, reserve, dataptr }
growth rate = 1.5

initializing:
dataptr = allocate (reserve) bytes
size = 0

on push:
if size + 1 > reserve { reallocate by reserve * growth }
data[size] = element
increment size

wow, you are now no longer reallocating on every push! congrats

>no classes
>no inheritance
good riddance
>no constructors
func NewObject(params) Object {}
>no annotations
ew
>no generics
define a new interface with what functions you want and pass it to your function
congrats you have bounded generics now
>no exceptions
again, ew
>fixed sized arrays
for what, exactly? plus go has these? what do you think an 'array' is??

>no longer reallocating on every push!
Way to move the goalpost.

cute post more

Attached: 1516009839398.jpg (1572x800, 226K)

which is literally what Go does
package main

import "fmt"

func main() {
s := make([]int, 5)
fmt.Printf("cap: %v %v\n", cap(s), s)

s = append(s, 42)
fmt.Printf("cap: %v %v\n", cap(s), s)
}

>cap: 5 [0 0 0 0 0]
>cap: 12 [0 0 0 0 0 42]

>generics is subtype polymorphism
kill yourself retard

generics 'is' whatever generics 'does'

Attached: shirt-1521313115-2c7aba7ec290f1bc716fbeb509e140f1.jpg (800x800, 49K)

and what generics 'does' is free you from having to write type assertions.

Attached: fancy_gopher_renee.jpg (779x888, 47K)

No. Java was constrained by the retarded JVM which couldn't support proper generics.
Go doesn't have any such issue.

No generics is a meme. The rest are actual good design choices.

Attached: fiveyears.jpg (1262x733, 212K)

What should I use to make shitty rest websites then, Java?

>"REST"

I mean at that point you've already fucked up so it doesn't matter where you go from there

REST is literally the same thing Plan 9 did with file servers and synthetic files

>You define an array size on creation and cannot change it later
That's the definition of an array. If it could be resized, it would be a vector, you idiot.

Literally anything?

A. It's never actually implemented strictly because strict REST often conforms poorly to business requirements

B. GraphQL shits all over it

never thought I'd see the day... Jow Forums full of underage devs who cannot grasp a language without classes.

There's whole other worlds out there folks. Go is a different paradigm that is a whole lot more sane than most OOP languages.

Although I do agree they should get generics in there, otherwise the language is basically perfect.

Attached: 1436591670032.png (261x275, 82K)

>>no classes
Structs do everything classes need to do
>>no inheritance
Encapsulation and implements
>>no constructors
Are you retarded?
>>no annotations
Complain to someone who makes IDEs
>>no generics
Oop is a plague
>>no exceptions
Exceptions encourage bad programming. They are almost as harmful to readable code as goto
>>fixed sized arrays
And expandable?

>generics
>oop

ohhh non no n no

This has to be bait

There’s a metric shit ton of go jobs open

If you are looking for a job with one, go. If you are looking for which one is ultimately better once you learn it, rust

It compiles fast which I don’t really care about but that is something that was critical to why they developed a new language instead of c++

Arrays _are_ a fixed size. It just so happens that Go provides a nice abstraction around them (slice) that manages resizing them for you.

Seems nobody in this thread knows the difference between a slice and an array.

tour.golang.org/moretypes/7

>rust
>better than anything

I think I was at this talk

not the guy you're replying to, but in many ways it's better than go, yes.

hahha nerd

hey, that's nice
do you mind explaining what the third argument on make does?

>no inheritance
Really? I might give it a try then. The shittiest code I have to deal with always overuses inheritance.

pls do
you won't regret it

>this is who you're arguing with about Go on Jow Forums

Attached: 1535355650393.png (345x283, 5K)

this language is cancer, most horribly designed modern language I've ever seen, sadly I have to deal with it daily because I work in the cloud native sector

>composition > inheritance
Explain why.

>>no constructors
>you can easily write a newXXX function
A constructor is a way to guarantee that an object is initialized/well-formed. Of course you can write newXXX in any language, but you need constructors and exceptions to have that guarantee.

>>no exceptions
>a good thing
Clearly not.

>I work in the cloud native sector
WTF is the cloud native sector

Why can't the world hold hands and improve the Haskell compilers?

Go has package-level encapsulation. If the only public method that can create a Foo is newFoo then you've guaranteed that Foo is always well formed.

kubernetes, microservices and distributed systems meme

So the same as C then

>they actively discourage or even disallow the use of the funtional paradigm
Do you have brain damage? Go has closures and the creators even encourage using them in creative ways.

>Obviously both C++ and Java developers laughed heartily in the face of Go
That's ironic considering Go was invented while waiting for C++ code to compile.

Go is substantially faster than Java because not everything is an object that needs to be garbage collected.

Slice of 100 ints in Go: One object, one gc op
ArrayList of 100 Integers in Java:, 101 objects, 101 gc ops

hahaha no, that's not how Java works
btw Interface types in Go are really the same as how Objects are implemented e.g. in Java

which is also the reason collections in Go suck for cache alignment. Because it's always a collection to pointers to dynamically allocated data as soon as the collection is over some interface type.

holy fuck

how can one person be so bluepilled?

>Fixed size arrays
The intelligence of gohaters everyone.

Attached: serveimage(38).jpg (645x729, 57K)

I think if they just went for a revision of C rather than going full retard and renaming the whole thing it would be one of the most used languages right t/tomorrow.

>recognition that C needs a much bigger standard library not just a collection of linux spinets.
>recognition that some complex functions should be part of the language standard rather than a lib.
>recognition that we need a proper method to fetch libs rather than using git or what ever meme(ye i know its shit how they implemented it).
>recognition that the strong element of a language is not the amount of hipster C-- tier shit you can implement.
>recognition that the logo has to be furry shit

Having no generics, plus the obnoxious braindead mascot, is a huge turnoff for me. Rust is miles better than this piece of crap.