[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why aren't you programming in Go yet?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 97
Thread images: 13
File: google-go-language.jpg (17 KB, 450x272) Image search: [Google]
google-go-language.jpg
17 KB, 450x272
Why aren't you programming in Go yet?
>>
does google even program in go? I talked to a guy there and he didn't seem to think so.
>>
It's created by the best company in the world, Google. Whatever Google does, is bound to be the best. So Go must be the best programming language.
>>
because it's so shit not even google uses it
>>
I am.
>>
I am.
>>
File: 1409901803018.jpg (6 KB, 190x200) Image search: [Google]
1409901803018.jpg
6 KB, 190x200
>>53490038
There's no profit in it. Poorfags gtfo.
>>
I am.

I just can't find a job with it because I'm a tard.
>>
>>53490038
BOTNET
O
T
N
E
T
>>
I tried once but there were no libraries worth using.
>>
>>53490111
>>53490108
>>
Moved most of my personal projects to Go and I love it.
>>
Just started learning it as a first programming language for fun.

How stupid am I?
>>
>>53490139
You're not stupid, you're a genius. You're learning the language of the future, you'll be ahead of everyone else. You are gonna go places kid.
>>
File: go.png (54 KB, 1077x815) Image search: [Google]
go.png
54 KB, 1077x815
I am.
>>
>>53490139

it's a pretty good language to start 2bh familia
>>
>>53490168
>language doesn't provide a min macro
L O L
O
L
>>
>>53490111
where I am it seems to be a good addition to your resume for Rails work.
>>
>>53490168
>useless comments
Why do people do this?
>>
im considering learning it to contribute to some sublime text clone on github .
>>
What makes Go different?

For starters, it’s simple. As mentioned, one basic problem Go tries to solve is the need to reduce the mental overhead that it places on developers. Several aspects of the language highlight this. These include:

>Focused vocabulary
Many languages have numerous keywords that a developer must remember. Several of these keywords are designed to support programming concepts that have been around for decades. With Go, many of these concepts have been condensed as much as possible in order to reduce the amount of keywords required. As a result, Go currently has around 25 keywords, as opposed to 50 or more for languages like Java and C#.

>Simple scoping rules
Many languages offer developers great flexibility to ensure that variables and functions can be hidden from other parts of the code base. Go has only three levels of scoping and very simple conventions for determining scope:

>Local variables (declared within a function) are scoped to the current block.
Package level variables are scoped to the package if they start with a lower-case letter.
Package level variables are publicly scoped if they start with an upper-case letter.
There’s no “private” scope, as you might have expected, which is enough to make some developers uncomfortable. But in practice, this actually opens up a lot of opportunities.

>Built-in garbage collection
Garbage collection is a difficult problem to solve. However, manual memory management often incurs a fairly high cost on the developer and makes it more difficult to write error-free code. This is why the developers of Go made it a requirement to have it in the language. Initially, the garbage collector could take a heavy toll on an application in terms of performance. However, the cost of garbage collection is falling rapidly thanks to determined effort.
>>
>>53490225
because the author of that code might not have considered that piece of code as simple as you did
>>
>>53490247
>For starters, it’s simple
AKA stripped down for retards.
>>
>>53490325
The issue at hand is not only to make the language simple for retards, but also to keep smart people from overengineering their shit, resulting in not even themselves being able to work with their code.
>>
>>53490247
>Package level variables are scoped to the package if they start with a lower-case letter.
>Package level variables are publicly scoped if they start with an upper-case letter.
that's fucking stupid
>>
>>53490381
has the advantage of showing you the visibility in every caller, has the disadvantage of having to refactor callers when changing the visibility
>>
>>53490225
I don't know, why did you post one?
>>
>>53490369
There are solutions to this other than removing crucial things such as generics.

In fact, not having proper generics makes this Overengineering: The Language.
>>
>>53490472
rekt
>>
>>53490472
Dis nigga tbqh familia.
>>
>>53490484
yeah yeah the generics thing is fucked (although less annoying than i initially expected, when i need something out of the ordinary i usually want something performant, very use case oriented i have to write myself either way, the rest is just small boilerplate)
generics weren't really "removed" from the language, they were never added because the go designers didn't find a way to fit them into the goals of the language (fast compilation & fast runtime, one of which suffers due to generics).
type inference would also become a lot more complicated
but yeah, there definetly are cases were you wish you had them
>>
>>53490038
I prefer Elixir and Haskell.
>>
>>53490472
R.E.K.T
>>
>>53490616
I guess my question is why don't I just use Ada since that manages to do generics nicely and still be fast on runtime and I guess not as fast but still not slow to compile? From what I've read it feels like Go set out to do a lot of the things Ada did.
>>
File: 911.jpg (23 KB, 400x400) Image search: [Google]
911.jpg
23 KB, 400x400
>>53490472
>>
I am since few yearss. Thank god I can postpone c++
>>
File: 1457963302067.jpg (28 KB, 680x583) Image search: [Google]
1457963302067.jpg
28 KB, 680x583
What's the point of learning it if Deepmind is just going to beat you anyway?
>>
File: 1456580870410.jpg (117 KB, 800x800) Image search: [Google]
1456580870410.jpg
117 KB, 800x800
>>53490472
ROASTED
O
A
S
T
E
D
>>
>>53490038
cause im not a fagGOt
>>
Didn't they used to call it the Turtle Graphics language back in the day or some shit like that?
>>
>no generics
>no macro
>mandatory GC
>average to bad readability
D is better for its use case
>>
Can't program at all yet. Would like to learn C or Java instead of a meme language to start with.
>>
>>53490060
People use Go here plenty.
>>
I stalked an exbf from university.
He has a job writing Go for some start up San Francisco.
What a fucking faggot.
>>
File: 1420559923820.png (156 KB, 596x590) Image search: [Google]
1420559923820.png
156 KB, 596x590
>>53490038
What can I programm with it?
>>
>>53496781
Anything you can program in Brainfuck.
>>
>>53490038
fucking ai robots can go to hell to be honest family
>>
>>53496788
But I have no ideas atm and I won't rewrite my current project
>>
>>53496398

You're thinking of LOGO.

And yeah, I'm currently rewriting a Node trainwreck in Go. It's a great language - statically typed, has green threads that are mapped to OS threads so you get true concurrency and aren't forced to callback all the things, interfaces are great, being able to attach methods to almost any type you create is great, easy interfacing with C is great, the tooling surrounding the platform is great. No generics is pooh, but I've only ran into problems with the type system once or twice.
>>
What is go best used for?
>>
File: shot0019.jpg (93 KB, 469x469) Image search: [Google]
shot0019.jpg
93 KB, 469x469
>>53490472
>>
>>53490247
>However, manual memory management often incurs a fairly high cost on the developer

Do people just not know about smart pointers?
>>
>>53490038
Because I'd rather be using rust or lisp if I'm not using C.
>>
>>53490038
Because I'm already learning Forth and am not going to learn two languages simultaneously.
>>
>>53490038
because D exists
>>
Because I'm not a hipster startup doing webshit. That's all Go is used for.
>>
>>53496657
I'm a big fan of D anon, but don't for a fucking second pretend that GC isn't mandatory in D
>b-but there's this attribute which forbids me from using 99% of the standard library and half the builtin features because they allocate
nobody ever uses it
>>
File: 1445924763557.jpg (13 KB, 476x345) Image search: [Google]
1445924763557.jpg
13 KB, 476x345
>>53498686
>JVM language
>>
Because C and Perl is enough to do everything I want.
>>
>>53498748
what?
>>
File: zF6hijN.jpg (692 KB, 9000x9000) Image search: [Google]
zF6hijN.jpg
692 KB, 9000x9000
>>53498748
>>
I don't know anything about computers but I want to learn so I can program my phone and stuff is Google go a go place to start?
>>
>>53498867
*good
>>
>>53490038
because its shit
>>
>>53498790
the language is based on JVM meaning that no matter what you need java to run/compile GO code
also java sucks
>>
>>53490038
Because Rob Pike is a fucking cancer.
>>
>>53499329
wait what?
I'm talking about D you triple nigger
>>
>>53490038
Swift is looking to be better
open source as well
>>
File: rusty.png (4 KB, 100x67) Image search: [Google]
rusty.png
4 KB, 100x67
>Programming in Rust
>Hate the compiler
>Stay with Rust
>Compiler kills me in my dreams
>>
>>53494212
>imblying
Inb4 deepmind is written in Go
>>
>>53490038
because haskell exists
>>
>>53499420
>I hate type safety
>>
>>53490038
too busy in school tbqh
>>
>>53499447
what can Haskell do?
I've heard it mentioned before, and they say its a meme. What do you like about it anyways?
>>
>>53499495
with haskell you get free bragging rights
>>
>>53499495
it makes me feel superior
>>
>>53490038
Actually I was interested in Go because it has an hex package that makes encoding and decoding much faster, I need this kind of stuff for a project I want to start soon, it's about encryption.

This is the package by the way: https://golang.org/pkg/encoding/hex/
>>
>>53496398
holy shit logo, so many memories
>>
>>53499495
It's lazy, functional and strongly typed.
This eliminates some sources for bugs and leads to a quite different programming style, haskell code reads more like math, I like that.
The ecosystem is also alive and chances are, there is a library for what you want, so it's also a language where you can get shit done, not only some academical circle jerking.
>>
>>53499853
I'll give it a try
hopefully I can build something useful with it
>>
>>53499853
>monads
Into the trash
>>
>>53499940
well, how would you sequence actions then faggot
>>
>>53499957
Uniqueness typing
>>
>>53500010
explain
I have no idea what you're talking about
And yes I'm new into functional programming
>>
File: 34832948932.jpg (27 KB, 948x711) Image search: [Google]
34832948932.jpg
27 KB, 948x711
>>53490038
Go to hell.
>>
>>53500021
The compiler enforces that anything with an uniqueness annotation is only used in a manner where the order of execution does not matter


https://en.m.wikipedia.org/wiki/Uniqueness_type
>>
>>53500067
Monads are necessary for the execution order of IO though.
>>
>>53500067
but monads were invented for situations that require order of execution
e.g.
main = getLine >>= putStrLn

you can't putStrLn first without getting a line
>>
Because Erlang VM already exists.
>>
>>53500127
>>53500130
http://www.mbsd.cs.ru.nl/publications/papers/cleanbook/CleanBookI.pdf

Check the chapter on interactive programs or search for uniqueness typing
>>
>>53490191
https://golang.org/pkg/math/#Min
just cast to float64 and out
>>
>>53490472
S A V A G E
A
V
A
G
E
>>
>>53500818
For goodness sake!
I think you don't what the [current-year] is because that is not acceptable in the [current-year > 1985]
>>
pls add generics, I don't feel like using interface{} everywhere.
>>
File: laughing+whores.png (490 KB, 449x401) Image search: [Google]
laughing+whores.png
490 KB, 449x401
>2010+6
>still feeling euphoric when you mention the lack of generics in Go
Back to /r/programming with you
>>
it's hard to ignore Go as a webdeveloper
>>
>>53490038
because C is better for embedded
Thread replies: 97
Thread images: 13

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.