[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Thoughts on Go?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 63
Thread images: 2

File: serveimage.png (167KB, 3861x3861px) Image search: [Google]
serveimage.png
167KB, 3861x3861px
Thoughts on Go?
>>
shit
>>
shit
>>
>>58752580

retard
>>
D is better.
>>
>>58752558
good enough for mundane stuff like web backends
>>
A very nice language that made programming fun again:
>concurrency
>static linking
>no inheritance
>packages
>tools
>>
>>58752640
So basically... C.

Unless you need to program for 1000 cores; which you don't. Get over it, Go serves no purpose outside of its niche.
>>
>>58752662
>C
Yeah, you should just use C instead of this garbage collected language or vice versa. Sure.
>>
>>58752662
C is inherently broken:
>the way include works
>separate c and h files
>no tooling - hard to (create and) distribute libraries
>no methods on structs
>no interfaces
>no namespaces/packages (I prefer the latter solution)
Also all programs should be written with concurrency in mind. It will not always make them faster but it is conceptually easy to write many things thanks to it - channels are great. It is time to let C die, lets face it
>>
>>58752719
>No methods on structs
Pajeet, have you heard of objects yet?
>>
File: 1484931492723.gif (1MB, 217x217px)
1484931492723.gif
1MB, 217x217px
>>58752686
>garbage collection
>good
>>
>>58752752
>memory leaks
>good

inb4 not in the correctly written programs -
show me one then
>>
>>58752719
>>separate c and h files
Why do people dislike this? It makes C/C++ code so much more readable. Besides you don't have to do it.
>>
>>58752558
- Great standard library
- Fast
- Static linking has its benefits
but
- Poor type system
- Poor dependency management
- Pretty verbose
What Go offers may be worth it for large teams, especially if they use a single big Google-style repository for everything. For small teams and solo developers, however, I hope something more expressive like Swift or Crystal becomes a viable, mainstream alternative. Rust takes more effort to write. I used to have hopes for Nim, but it is kind of a mess.
>>
>>58752774
>Why do people dislike this? It makes C/C++ code so much more readable.
If you're a faggot and don't know how to use your IDE.
>>
>>58752778
pretty much this
>>
>>58752558
yet another language that has significant white space
into the garbage it goes
>>
>>58752719
http://freepascal.org/
>>58752774
>It makes C/C++ code so much more readable
http://wiki.freepascal.org/Unit is as readable without introducing the kind of compilation overhead .h files do.
>>
>>58752766
Sure. That's how you C: https://github.com/openbsd/src/tree/master/bin

Unfortunately the "programming is easy" meme has ruined CS and now shit like garbage collection has become the norm. It's good when you're a fucking moron who needs the programming language to save you from fucking shit up. It's a massive hindrance when you're actually worthy of your title and can follow the most basic memory management best practices.

TL;DR: git gud
>>
>>58752857
You sound like a bitter person who realized that programmers are just glorified plumbers and there is nothing magical about their jobs. Well guess what you are not special.
>>
>>58752925
I'm an engineer; programming is just one of the many skills I need to excel at.

It seems to me you're the one who got stuck as the glorified plumber / code monkey, while the rest of us kept climbing the ladder. God bless.
>>
>>58752558
GO stands for GarbageOriented
>>
>>58752857
I really doubt that you sincerely hold this kind of sentiment or that you are an experienced programmer, but your acting isn't entirely unconvincing, so I'll explain the problem in the earnest.

If "that's how you C" every piece of software, not just security-critical low-level infrastructure, your time to market becomes shit and your company crashes and burns. Sure, good programmers following something like http://homepages.inf.ed.ac.uk/dts/pm/Papers/nasa-c-style.pdf with a strict code review and Valgrinding it to death can avoid most memory errors or even all if your codebase is small enough. The matter is that most of the software you use daily wouldn't exist if they did that because it would make no economic sense for companies to develop it and it would be too much time and effort for hobbyists. If you want usable, secure software developed fast, you can't use manual memory management. Tracing garbage collectors with their usual pauses and excessive memory usage aren't the only alternative to it, either.
>>
>>58753148
>The matter is that most of the software you use daily wouldn't exist if they did that because it would make no economic sense for companies to develop it and it would be too much time and effort for hobbyists. If you want usable, secure software developed fast, you can't use manual memory management. Tracing garbage collectors with their usual pauses and excessive memory usage aren't the only alternative to it, either.

That's cool and all, and that's why Java exists.

What problem does Go solve? We already have a language for rapid and large-scale software development, with garbage collection, yes. Now just what Go strives to be that warrants garbage collection? Nothing. It's a highly concurrent language that can't be used in systems programming because GC stands in the way. Because of that it gets relegated to only being good for its own very small niche of problems. Go is not the language of the future, and fuck no, it won't replace C.
>>
>>58753939
I wasn't talking about Go in my post, but I'll respond.
>What problem does Go solve?
Go is a language made for Rob Pike's underlings at Google. Its design and features are chosen to make them produce good-enough network services faster. Everything outside this niche is merely a happy bonus.
>>
Go is a great general purpose language.

Go > C > Python > JS > D > Rust > C++ > Java
>>
>>58754235
>general purpose language
No such thing.
>Go > C > Python > JS > D > Rust > C++ > Java
Is your ">" meant to be transitive?
>>
>>58754202
The thread is about "thoughts on Go", though. I'm just tired of seeing it being recommended as C alternative, as a web dev language, or whatever the fuck people are trying to use Go for these days.

At least we can agree it's a language tailor-made for Google's problems and useless for anyone else.
>>
what are some useful things you can do with it? serious question
>>
>>58752857
life is more enjoyable when you aren't pissed off all the time, anon.
>>
>>58754345
>The thread is about "thoughts on Go", though
Obviously, but the post I was replying to was about C, or more precisely, about manual memory management in C. I thought I refuted it without suggesting that I liked Go. My point about tracing garbage collectors was to that end.
>I'm just tired of seeing it being recommended as C alternative
It's no alternative to C except if what you were going to write in C was something that is rarely justified to write in C today, like a simple command line utility or a network service.
>useless for anyone else
I'm hardly a fan of Go, but I wouldn't go that far. A lot of companies have problems to solve that kind of sort of look like Google's except on a much smaller scale. They can write their network services in Go instead of a JVM language if they need those RAM-saving value types. Many of them will, of course, choose Go over Java or even Erlang for the wrong reasons.
>>
>>58754734
>but the post I was replying to was about C, or more precisely, about manual memory management in C.
If by that you mean that garbage collection on C would somehow be a good idea, then I don't know what else to tell you.

C is supposed to be fast and give absolute control to the programmer. Of course that doesn't come without a consequence. If you want blazing fast programs, you have to give up on garbage collection. If you want to have absolute control over every bit of memory, then you must know how to do it without breaking things; i.e. you must learn how to C. If you can't handle that, then don't use C.

Manual memory management on C is a feature, not a bug. The good thing is that a good C programmer knows how to use that to his advantage to manage memory to optimize performance while taking care of possible leaks, to produce elegant, safe and efficient programs. The bad thing is that for every good C programmer there are dozens of awful C programmers.

But that's not a problem with C, but with whomever uses it. What has to stop is the attitude that C is an easy language, or a beginner's language, or a "general purpose" language to write all your software in, or that you can get away with rushing stuff in C like you can do on Java or Python. That's not how it works, and it takes a lot more effort and thinking to write good C code, hence the "that's how you C". Companies who need to put out software to the market fast and can't afford to cater to the code the way C demands should just use another language that better suits those needs.
>>
>>58754415
Anything that requires concurrency and high throughput.

For example, you might want to query a stock API, but since there are thousands of stocks and you want to update them live, it would make more sense to query all the stocks at the same time instead of consecutively.

Go is built to do things like this.

Using the language is like using a more c-like python.

It's like a really fast, concurrency oriented, c-like python.

It doesn't have the same amount of third party libraries because python is much older, but there is basically no reason to use python over Go.

The only reason to use C instead of go is if you need extremely high performance that you can only get by manually managing memory allocation.

Java and C++ are cuck languages that are a convoluted mess and not really worth learning completely. You're best learning C or Go, then only writing C++ and Java when you need to. C++ and Java aren't languages that are worth spending time learning.
>>
>>58755235
>If by that you mean that garbage collection on C would somehow be a good idea, then I don't know what else to tell you.
No. Why on Earth would I mean that? Either I am less clear than usual, or you keep reading into my posts what isn't there. If it's the latter, seriously, no GC diehards are out to get you, man, and I am not even one.
>If you want blazing fast programs, you have to give up on garbage collection.
That is true, but it seems somewhat misleading. Because garbage collection defers freeing memory, programs with GC can achieve better raw throughput than those using free() naively. The core issue is not the GC itself, but dynamic memory allocation, and the cure, if you want top performance, is to minimize it.
>Manual memory management on C is a feature, not a bug.
Duh.
>What has to stop is the attitude that C is ... a "general purpose" language
That's what I am saying as well. C is a systems programming language in a sense in which Go just plainly isn't. This is not to say I think C is an especially good systems programming language. There is a lot a language can do to prevent at compile time the kind of errors that C happily lets through. But C is popular and right now it has the best tooling.

Watch https://archive.fosdem.org/2016/schedule/event/ada_memory/. I'd be willing to bet money that in 15-20 years every new project with low-level code will seriously consider a language that is neither C nor C++ before C and C++.
>>
>>58752748
>objects
>C
>>
It's shit made for retards.
>>
>>58757256
>he think you can't do oop in c because c++ for dummies said so
>>
If ken thompson made it it's probably good
>>
C is obsolete. YouTube switched from C to Go.
>>
>>58752558
If you like writing tons of boilerplate code but you're too scared to write C cause you're too dumb to manage memory, then sure.
>>
Why do people keep comparing C and Go?
Go was never meant to replace C; at best it's a replacement for Java and C++, which were judged as being too bloated.
Google still uses C for anything that requires high-speed performance, such as their codecs.
>>
Go is a thought-terminating cliché
>>
>>58759528
https://en.wikipedia.org/wiki/Paul_Graham_(computer_programmer)#Blub
>>
>go
>more like stop
>>
>>58759516
Not trying to excuse half of the braindead posts in this thread, but it's largely the creators' fault; from the beginning they kept marketing it as "systems programming language" without clarifying they were using the obsolete 70s definition meaning "anything lower level than a shell script".
>>
Name a better language for concurrency
>>
>>58759714
haskell erlang rust
>>
>>58759714
Every language for the Erlang VM, Pony, arguably Clojure.
>>
>>58759722
Autism, literally who, SJWlang
>>58759763
dude JVM lisp lmao
>>
>>58759775
Hookshit
>>
>>58759775
>second-hand opinions
If Rust had been designed by Stalin himself its management of variable lifetimes would have still been a valuable innovation.
>>
>>58759879
>what is unique_ptr
>what is RAII
you need to be 18+ to post here
>>
>>58759936
>you need to be 18+ to post here
Indeed. You'd think someone who understands RAII would be able to do his own research to find out how it differs from Rust's lifetimes.
>>
>>58754235
>Python and Javascript are better than Rust and D
LOL
>>
>>58754444

what if you enjoy being pissed off tho?
>>
>>58760359
You should work on a brain-computer interface to hook up your brain directly to /v/. It would be better than wireheading for you.
>>
We use it on my team at work for our APIs and it's fantastic for exactly that. I think if I wanted to do much more than handling HTTP calls and reading/writing to databases I'd prefer something else though.
>>
Dプログラミング言語はGolangよりずっと優れています。
>>
>>58760617
The only way D has surpassed Go is in the number of years it's floundered without any substantial user uptake.

Also you're not Japanese and no one able to read your simple declarative sentences is prone to being impressed so stop being a faggot.
>>
>>58752752
fucking C babies who don't know shit about programming just spouting their memes.

> oh this language has those things? I guess it's exactly like C!
> also I read somewhere that GC is bad, I better point that out!
>>
>>58752752
>implying C doesn't have automatic cleanup of certain variable scopes
>implying you don't implement your own garbage collection methods when using dynamic allocation outside of those scopes
I'm not trying to anger Grace but I think the 3 nanoseconds in performance difference between your own cleanup vs a general one is negligible in most cases, in the situations where it's not you're probably not writing in C anyway.
>>
>>58760715
Go is shit get over it
also getting this triggered over a joke lol
Thread posts: 63
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.