Is golang good to learn? is it easy?
not looking to get a job... just looking for a simple, elegant, clear language to code as a hobby
I already know some Python, Java and C#
Yes, it's objectively the best programming language.
See diagram (pic. related)
>Is golang good to learn?
Yes.
>is it easy?
Yes.
>Is it a good programming language worth learning?
No.
>>61039974
>simple, elegant, clear language
Fits these quite well, although I really regret the forced automatic memory management and lack of shared linking. They got almost everything else right.
>>61040072
Go is just as boilerplate as Java, slower than Java
Golang is absolutely shit
$cat in Go:package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
)
func main() {
flag.Parse()
flags := flag.Args()
var text string
var scanner *bufio.Scanner
var err error
if len(flags) > 0 {
file, err := os.Open(flags[0])
if err != nil {
log.Fatal(err)
}
scanner = bufio.NewScanner(file)
} else {
scanner = bufio.NewScanner(os.Stdin)
}
for scanner.Scan() {
text += scanner.Text()
}
err = scanner.Err()
if err != nil {
log.Fatal(err)
}
fmt.Println(text)
}
$cat in D:import std.stdio, std.array, std.conv;
void main(string[] args)
{
auto source = args.length > 1 ? File(args[1], "r") : stdin;
auto text = source.byLine.join.to!(string);
writeln(text);
}
>>61040185
>It took the D Shilling Task Force almost 30 minutes to arrive
What took you so long? Doesn't Andrei pay you enough?
>>61040196
where did the lispers go?
>>61040365
>#include
Stopped reading RIGHT THERE
>>61040365
>std::cin.rdbuf() : std::cin.rdbuf())
C++ "programmers", everyone
>>61040185
Wow I had no idea that D was so shit.#include <iostream>
#include <fstream>
int main(int argc, char *argv[]) {
std::cout << (argc > 1 ? std::ifstream(argv[0]).rdbuf() : std::cin.rdbuf());
}import sys
print((open(sys.argv[0]) if len(sys.argv) > 1 else sys.stdin).read())
>>61040382
Fixed, I can't fucking paste a snippet properly. The very first post was actually correct.
>>61040388
And now I wrote it with fucking argv[0] instead of argv[1]
I give up.
>put D on my resume
>never get a call back
>take it off replace it with Java
>20 offers in one week
>>61040388
>I can't fucking paste a snippet properly
It;'s okay, C++ "programmers" are retarded in general
>>61040395
Thanks for the update, rakeesh,
>>>/out/loo
>>61040394
>And now I wrote it with fucking argv[0] instead of argv[1]
pleb. how else can an os make subsequent calls to the application if it were to crash?
>>61040388
>No modules
>Header files
> << >>
> ::
EWW
is Go a systems programming language or what?
>>61040388
>argv[0]
C++ "programmers", everyone
top kek
>>61040419
it tried
>>61040419
According to Go shills, it's a system programming language if you compare it with Java or Python, but not a system programming language if you compare it with proper system programming languages like C++17 and Rust.
>>61040433
>C++17 and Rust
C++ and Rust are both ugly abomination
>>61040419
The developers called it that but they were using an ancient UNIX-era definition of systems programming that basically encompasses anything more low-level than a shell script.
>>61040419
Any language with a runtime isn't a systems programming language.
Go has a GC and a scheduler built in. So no.
I'd say systems programming language also needs pointer arithmetic. Go doesn't have that either.
>>61040433
>proper system programming languages like C++17 and Rust
Rust isn't even a proper programming language.
>>61040717
>Any language with a runtime isn't a systems programming language
Ok kid, enjoy rewriting the GNU operating system without crti/etc.
>>61039974
No, the documentation is absolute crap.
Also time formatting and parsing is absolutely fucking retarded.
>>61039974
>no map/filter/reduce in the standard library
>not even a way to implement them so that performance is not shit
stay away from this crippled language
>I already know some Python, Java and C#
then you'll pick up Kotlin in no time
>>61039974
If you can live with a meta programming story and type system worse than C and Java - and that is really scraping the bottom of the barrel, sure, why not.