Go - What do you think?

Go - What do you think?

Postby Ntech » 23 Nov 2019, 17:40

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?
Deo gratias, Ave Maria
User avatar
Ntech
 
Posts: 94
Joined: 30 May 2019, 20:40

Re: Go - What do you think?

Postby Julius » 23 Nov 2019, 20:57

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.
User avatar
Julius
Community Moderator
 
Posts: 3297
Joined: 06 Dec 2009, 14:02

Re: Go - What do you think?

Postby Lyberta » 23 Nov 2019, 23:28

Deleted.
Last edited by Lyberta on 01 Oct 2021, 09:55, edited 1 time in total.
Lyberta
 
Posts: 765
Joined: 19 Jun 2013, 10:45

Re: Go - What do you think?

Postby dulsi » 24 Nov 2019, 03:05

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.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Go - What do you think?

Postby mdtrooper » 25 Nov 2019, 10:31

IMHO: I think Rust is most awesome for the games developing and Python is old buddy for game developing.
And I have a Patreon in https://www.patreon.com/migueldedios.
User avatar
mdtrooper
 
Posts: 185
Joined: 26 Jul 2012, 13:24
Location: Spain

Re: Go - What do you think?

Postby Ntech » 25 Nov 2019, 19:48

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.
Deo gratias, Ave Maria
User avatar
Ntech
 
Posts: 94
Joined: 30 May 2019, 20:40

Re: Go - What do you think?

Postby Lyberta » 26 Nov 2019, 00:13

Deleted.
Last edited by Lyberta on 01 Oct 2021, 09:55, edited 1 time in total.
Lyberta
 
Posts: 765
Joined: 19 Jun 2013, 10:45

Re: Go - What do you think?

Postby smcameron » 26 Nov 2019, 03:04

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
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Go - What do you think?

Postby Lyberta » 27 Nov 2019, 02:06

Deleted.
Last edited by Lyberta on 01 Oct 2021, 09:55, edited 1 time in total.
Lyberta
 
Posts: 765
Joined: 19 Jun 2013, 10:45

Re: Go - What do you think?

Postby O01eg » 27 Nov 2019, 21:05

Lyberta {l Wrote}:That's very barebones, barely any better than C.


At least C has macroses.
Public FreeOrion multiplayer server: https://freeorion-test.dedyn.io/
Slow paced multiplayer server (registration required!): https://freeorion.org/forum/viewtopic.p ... 705#p95705
Donates for FreeOrion multiplayer improvements: BTC:bc1q04qnmql47zkha6p4edl86hm0wgk90dmsfnl3vl
O01eg
 
Posts: 68
Joined: 17 Sep 2012, 11:15
Location: Russia

Who is online

Users browsing this forum: No registered users and 1 guest

cron