Golang

is this useful for anything apart from microservices?

what's the ideal language to build APIs in?

Attached: golang.jpg (840x593, 97K)

Other urls found in this thread:

gobyexample.com/closures
talks.golang.org/2012/splash.article
erlangbyexample.org/send-receive.
youtube.com/watch?v=7erJ1DV_Tlo
twitter.com/SFWRedditImages

For APIs Rust
for everything else Rust nightly

shoo shoo rust shill

Too many words, don't waste your time fren. Watch this:

dilate

Now just don't get irked when they try to play the "reasonable discussion" card, just let them seethe.

I like Go. Fuck the haters. It has a good, simple standard library that is large enough to allow you to quickly build a lot of things while also being small enough to easily digest with little reading.

Its syntax derives from C, but has a few additions or changes, making it easy to pick up if you have experience in languages similar to C.

It is not the ideal language. That would be a Forth with a populated standard library. But it is my favorite language that currently exists for getting useful work done quick.

kek

I somewhat feel this, although I could never bring myself to unironically use Go. It compiles instantly, has little bullshit, and generally w e r k s. But, it's fundamentally designed to view programmers as simpletons, and dumbs things down too much in my view.

It's not C/C++, but at at least it isn't rust.

In what ways would you say Go is too dumbed down?

no generics of any kind (yes I know C doesn't either)
garbage collection
general lack of features (most of what C++ has over other languages)

I mean it isn't even that bad when you compare it to Rust, but when Rob Like literally describes the target user as a guy "fresh out of college that might have used python or Java" I tend to assume it won't hold anything to established languages other than convenience.

Why not just use interface{} in place of generics?

I'll agree that garbage collection is annoying.

Adding more features would make the language more complicated. Instead, use the current features that can do literally anything and just make more packages.

I unironically use it as a scripting language with go run because I don't really like python and the others.

im currently writing an api in Go at work and we mainly use JS for everything

what's the usual language people use for building an API? python?

Most """new""" companies would use Node, it's rare for a company to use Go. Some unironically use PHP, others use .NET, Java and C#.
Although this is based on companies in my country
>Ireland

Java with Spring Boot framework

It just comes with so many features that not a single framework in any other language comes even anywhere close
The one massive advantage of Java will always be its enormous ecosystem

Go is the perfect web language, it will eventually kill Node and become the defacto backend programming language. Goroutines are incredible, you have actual control over concurrency rather than just handing off callbacks to a single event loop like in Node(that only uses one core). This is the future of multicore programming.

hey hey, php is at least decent now

Attached: golang.png (1500x1000, 57K)

Decent how? Allowing for sloppy shit meanwhile companies want to be able to excel with "continuous integration" methods. There is literally no reason to use PHP in 2019

Can you not... the Jow Forumsopher is the holy grail of Jow Forums and this is extremely disrespectful

It's great for anything where productivity is important, particularly when working with a team.

It's not exciting by any metric, but it's perfect for 'getting shit done' in a timely manner.

How the fuck do closures work and what are they even used for?

>Its syntax derives from C
Summerfag detected. Go's syntax is Oberon-2 with a *very* thin layer of C-colored paint.

Best explanation:
gobyexample.com/closures

Go is useful for a lot of shit, especially backend webshit. Key idea though is it's an "engineered" language, rather then a "designed" one.
talks.golang.org/2012/splash.article

This.

Python flask

I'm using it for a parser, for financial analysis and for serving web apps.
It has completely replaced python for all my projects since it is so much more performant, trustworthy.

see

This.
From endpoint security, to repositoriy pattern, interactions in other toolong. Spring has everything, and boot makes it easy to quickstart a microservice.

Co rotines are shit actors.
People couldn't understand erlang so they put in in SJW syntax (the ruby-like elixir) or worse, put a dumbed down less powerfull version of it's actor sustem and monitoring in other languages.
Go learn Erlang and understand what actuall concurrency and big distributed systems ate made of.

>throwing whole software stack away and replacing it with one static binary with low overhead is not exciting

php-swoole is enough!

Im actually familiar with Erlang and I agree that processes in Erlang are better in that they have their own built-in mailbox which is how the Actor Model works. But for simple I/O tasks Goroutines work fine.

>built in mailbox
Can you explain?

Every Erlang process has its own PID (Process ID) which you use to send messages to other processes. Every process has its own storage for receiving messages which is sort of like a mailbox. You have to write code in each process so it can read and process the messages it receives
erlangbyexample.org/send-receive.

Interesting thanks.
I had an idea like this except an os that sends data to other system processes using internal addresses instead.
Eg the DE sends the display data to the driver or the mouse input is sent to the DR etc.

Any other similar languages?

Golang: by retards for retards

Smalltalk was designed about message passing and the Actor Model. I think there are some functional languages that have concurrency systems similar to Erlang but Im not very familiar with that.

Its a good idea to hear Carl Hewitt the inventor of the Actor Model explain the theory behind it himself
youtube.com/watch?v=7erJ1DV_Tlo

Go supports channels.

>Why not just use interface{} in place of generics?
Because it removes type safety and can cause crashes. This alone prevents Go from being a safe language.

a channel is just a community mailbox, really doesnt compare to each process having its own mailbox

You could easily program each goroutine as an indefinite event loop that polls for new messages from a channel that is unique.

Thanks.
I had a very similar idea myself as I've said where each process has an address and ports to which "internal packets"/messages are sent to.

So you're saying erlang does this basically?

Braindead language by braindead SJWs for braindead programmers.

Generics are not essential, having a well thought domain space is better.
There are going to be generics in go 2 tho, so you brainlett will shut up finally

D I L A T E
I
L
A
T
E

back to your discord

Smalltalk-72 was based on the actor model as well. they moved to the current conception of methods instead of actor messages for efficiency reasons.

Tbh I'd still rather use PHP than Go for webshit.

based, golang is even worse than PHP overall

The excellent standard library, channels and the select statement make it great for a lot of utilities. The language has its downsides but it's my go-to tool (pun intended) for getting shit done. And reaching that point took almost no effort because the language is so easy to learn.