Page 1 of 1

Go - What do you think?

PostPosted: 23 Nov 2019, 17:40
by Ntech
After a couple years of hearing comments about Go (licensed under BSD), I finally decided to check it out, and I was pleasantly surprised -- in fact, I'm so pleased by Go that I think I'll make it my language of choice.

    -Go supports effortless cross compilation (Mac, Windows, Linux) -- from my Debian board I can make a Mac executable, or a 32 or 64 bit Windows executable, even a freeBSD or Linux executable with many architectures: i386, ARMv6, ARMv7, ARMv8, s390x, and ppc64le. That's a killer of a feature!

    -Go is pretty fast

    -Go can call C code -- just in case you want speed.

    -Go has pointers.

    -Go is easy to learn, and (a feature that I love) as of v1.0, Go won't be adding new features.

An interesting thing pointed out by the founder of Go is that most programming languages, as they "evolve," become more like each other. Like JavaScript adops classes, etc. The interesting thing about Go is that it'll stay the same forever -- no changes from Python2.7 to Python3, and the need to update code.

What really drew me in was its cross compilation capability. To cross compile C or C++, I had to jump through a whole bunch of loops, but for go, it's as simple as: "GOOS=windows GOARCH=386 go build hello_windows.go" or "GOOS=darwin GOARCH=386 go build hello_mac.go". While I can achieve a similar effect with Java, users don't have to install anything to run a Go executable -- for all they know it could be written in C or C++, and compiled natively.

Anyway, what do you think?

Re: Go - What do you think?

PostPosted: 23 Nov 2019, 20:57
by Julius
I can't comment much on Golang's features for programming (but hear opinionated, but mostly good things about it), but as a server admin Golang is (together with Erlang) my absolute preference. Maybe it is a result of various reasons, but server-side software written in Golang is in my experience easy to get running and is very resource efficient. I have come to the point where about 80% of the software I run on my server is written in Golang.

Re: Go - What do you think?

PostPosted: 23 Nov 2019, 23:28
by Lyberta
Deleted.

Re: Go - What do you think?

PostPosted: 24 Nov 2019, 03:05
by dulsi
How do you intend to use it for game development? Does it have a 2D and/or 3D graphics interface? I didn't see anything in a quick look. If it doesn't what do native Go games typically use. If you call out to C libraries can you still cross compile easily? I'm not fond of the static binaries typically produced.

Re: Go - What do you think?

PostPosted: 25 Nov 2019, 10:31
by mdtrooper
IMHO: I think Rust is most awesome for the games developing and Python is old buddy for game developing.

Re: Go - What do you think?

PostPosted: 25 Nov 2019, 19:48
by Ntech
dulsi {l Wrote}:How do you intend to use it for game development? Does it have a 2D and/or 3D graphics interface? I didn't see anything in a quick look. If it doesn't what do native Go games typically use. If you call out to C libraries can you still cross compile easily? I'm not fond of the static binaries typically produced.


There's this 3d library (https://github.com/g3n/engine) and this 2d library (https://github.com/faiface/pixel). As to the ease of using C libraries in cross compilation, both of the projects above use C libraries and can compile with a simple "go install".

mdtrooper {l Wrote}:IMHO: I think Rust is most awesome for the games developing and Python is old buddy for game developing.


I like Python and am interested in Rust, but I prefer Go because it's easier for me to cross compile it.

Lyberta {l Wrote}:What about Go generics they keep promising in Go 2.0? How do you write C++ std::vector without them?


I think there's something like a vector -- a slice, but I don't know if they're equivalent.

Re: Go - What do you think?

PostPosted: 26 Nov 2019, 00:13
by Lyberta
Deleted.

Re: Go - What do you think?

PostPosted: 26 Nov 2019, 03:04
by smcameron
Lyberta {l Wrote}:Can you resize the slice?


Kind of. To me, slices have pretty weird semantics, to me they feel sort of half-baked, like they're trying to be helpful, but not hard enough to be actually all that helpful.

https://golang.org/doc/effective_go.html#slices
https://blog.golang.org/slices

Re: Go - What do you think?

PostPosted: 27 Nov 2019, 02:06
by Lyberta
Deleted.

Re: Go - What do you think?

PostPosted: 27 Nov 2019, 21:05
by O01eg
Lyberta {l Wrote}:That's very barebones, barely any better than C.


At least C has macroses.