a thoughtful web.
Share good ideas and conversation.   Login or Take a Tour!
comment by Kerbobotat
Kerbobotat  ·  1832 days ago  ·  link  ·    ·  parent  ·  post: Go Is Unapologetically Flawed, Here’s Why We Use It

That was an interesting article to read for sure, but forgive my noobishness, what exactly is Go for?

Im by no means an expert programmer or anything, but I think I have a fundemental understanding of what languages do and comparisons between them. What is it that is making Go so popular, or sets it apart from other langauges?





rob05c  ·  1832 days ago  ·  link  ·  

    What is it that is making Go so popular, or sets it apart from other languages?

It's as fast as C++, easy to write as Python, highly parallel, and created by a popular company.

    what exactly is Go for?

It's primarily a systems-level language for things like back-end web services. It's fast enough to replace C++, but easy enough to write that Python and Ruby programmers like it.

To give you a better idea, they have a great tutorial to make a wiki in about an hour. My biggest Go projects have been an online multiplayer text game server (a MUD), and a service to manage schedules for electrical switches for power distribution systems. It worked well for both; though I hit the metaprogramming wall with the MUD.

zedadex  ·  1831 days ago  ·  link  ·  

    though I hit the metaprogramming wall with the MUD

What metaprogramming wall?

rob05c  ·  1831 days ago  ·  link  ·  

Specifically, lack of macros. Though Go's reflection and other metaprogramming paradigms also suck.

I had a pattern that was repeated everywhere involving both a continue and a return. Which is impossible to convert to a function; it has to be a compile-time macro. Which Go doesn't have. I put as much as I could in a function, but it still ended up being about 6 duplicate lines, repeated everywhere, which were literally impossible to abstract.

That said, that was before Go added go generate. I've yet to play with go generate, but I think I could use it to abstract the duplicate block. Though it's a pretty ugly way of doing it.

ironpotato  ·  1831 days ago  ·  link  ·  

I was previously attempting to write a MUD in python... it's no picnic either. So I decided to use the language I know best C... So far... things are okay.

Kerbobotat  ·  1831 days ago  ·  link  ·  

Thanks for the indepth, fantastic reply!

Ill definitely give Go a look, having a browse through the wiki tutorial right now, Ill admit some things are very strange to me after spending months bashing c syntax into my head for college but it seems easy enough to get to grips with. Now to find a project I can use go for :)

flopper  ·  1832 days ago  ·  link  ·  

If you are to believe the article, and my limited experience, the popularity of Go stems from its simplicity, approachability, and performance. It's easy to jump into Go and get some really nice results. As far as what it's meant for, I don't know for sure. A "garbage-collected systems language" is an oxymoron to some people, but not to others.

Seems like Go is probably going to fill the niche between higher-level compiled languages (e.g. C++) and popular dynamic interpreted languages (like Ruby or Python). Got a big compiled C++ application but wish your language was less crufty? Go might be for you. How about a Python programmer who's itching for type safety and performance? Go is again probably a good fit.